SitePoint Sponsor

User Tag List

Results 1 to 16 of 16

Thread: apache_note

  1. #1
    Serial Site Creator ToddW's Avatar
    Join Date
    Feb 2004
    Posts
    792
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up apache_note

    I have php 5.x and apache_note is not an available function!!!

    How do I enable or install this?

    THanks
    -Todd

  2. #2
    SitePoint Evangelist
    Join Date
    Aug 2005
    Posts
    453
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Computers and Fire ...
    In the hands of the inexperienced or uneducated,
    the results can be disastrous.
    While the professional can tame, master even conquer.

  3. #3
    Serial Site Creator ToddW's Avatar
    Join Date
    Feb 2004
    Posts
    792
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by byron3@earthlink View Post
    I know how to use it, I just need to know how to INSTALL IT.

  4. #4
    SitePoint Evangelist
    Join Date
    Aug 2005
    Posts
    453
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The function is packaged in php 4 and 5. I am using php 4.3.11 and the function shows with auto-complete in my Komodo IDE.
    When I execute the function in code I get a call to undefined function, could be because I am using IIS on a windows operating system. The manual says is an Apache-specific function.
    Computers and Fire ...
    In the hands of the inexperienced or uneducated,
    the results can be disastrous.
    While the professional can tame, master even conquer.

  5. #5
    Serial Site Creator ToddW's Avatar
    Join Date
    Feb 2004
    Posts
    792
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by byron3@earthlink View Post
    The function is packaged in php 4 and 5. I am using php 4.3.11 and the function shows with auto-complete in my Komodo IDE.
    When I execute the function in code I get a call to undefined function, could be because I am using IIS on a windows operating system. The manual says is an Apache-specific function.
    Ok, so your advice is what?

  6. #6
    Keep it simple, stupid! bokehman's Avatar
    Join Date
    Jul 2005
    Posts
    1,933
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you running Apache?
    Are you running PHP as an Apache module (not cgi)?

    If your answer to either of the above is no it will not be available.

  7. #7
    Serial Site Creator ToddW's Avatar
    Join Date
    Feb 2004
    Posts
    792
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by bokehman View Post
    Are you running Apache?
    Are you running PHP as an Apache module (not cgi)?

    If your answer to either of the above is no it will not be available.

    Running Apache: YES
    PHP As apache Module: YES

    Anyone else

  8. #8
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    http://localhost/test.php

    Code php:
    header('Content-type: text/plain');
     
    apache_note('test', 'newdata!');
     
    print apache_note('test');

    This should print 'newdata!'

    If not turn error_reporting to E_ALL do not hide notices.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  9. #9
    Serial Site Creator ToddW's Avatar
    Join Date
    Feb 2004
    Posts
    792
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If it worked I wouldn't need help... of course the error is the SAME as I posted first.

    Call to undefined function apache_note()

  10. #10
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Then you have a problem with your configuration you sure PHP being run as an Apache Module?

    check phpinfo() the first box should have something like this: Server | API Apache 2.0 Handler
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  11. #11
    Serial Site Creator ToddW's Avatar
    Join Date
    Feb 2004
    Posts
    792
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    WTF, it says CGI in there!

    Yetin my apache configuration it says module.

    How do I change that? (it's cpanel/whm box)

    -Todd

  12. #12
    Keep it simple, stupid! bokehman's Avatar
    Join Date
    Jul 2005
    Posts
    1,933
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ToddW View Post
    WTF, it says CGI in there!

    Yetin my apache configuration it says module.

    How do I change that? (it's cpanel/whm box)

    -Todd
    You can't change it without reloading the server software from scratch.

  13. #13
    Serial Site Creator ToddW's Avatar
    Join Date
    Feb 2004
    Posts
    792
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by bokehman View Post
    You can't change it without reloading the server software from scratch.
    So, disabling phpsuexec won't disable running php as CGI...?

    Or by "reloading software from scratch" did ytou mean just reloading apache?

    -TOdd

  14. #14
    Keep it simple, stupid! bokehman's Avatar
    Join Date
    Jul 2005
    Posts
    1,933
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    SuExec is in the server build, not PHP. Also I wouldn't consider disabling it just to gain some irrelevant PHP function. The extra security you get from SuExec is worth every minor inconvenience.

  15. #15
    Serial Site Creator ToddW's Avatar
    Join Date
    Feb 2004
    Posts
    792
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by bokehman View Post
    SuExec is in the server build, not PHP. Also I wouldn't consider disabling it just to gain some irrelevant PHP function. The extra security you get from SuExec is worth every minor inconvenience.
    Suexec is in the apache build not the entire "Server" build. ANd on a cpanel server when you rebuild apache you can upgrade php too. I got it working.

    The extra "SueXec" features you speak of... don't they only apply when multiple accounts/users are on the system.. ?

  16. #16
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ToddW View Post
    Suexec is in the apache build not the entire "Server" build. ANd on a cpanel server when you rebuild apache you can upgrade php too. I got it working.

    The extra "SueXec" features you speak of... don't they only apply when multiple accounts/users are on the system.. ?
    There are always multiple users on a Linux system. We're talking OS "users", not physical people. The security you gain by having each website's files owned by that website's user, and non-web files inaccessible to those users, is negated when every script process runs as the apache server's user which has greater permissions. Suexec allows you to run those script processes as the individual user instead, restoring the isolation through permissions. It helps to isolate a security hole in one website from allowing access to all websites and beyond.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •