The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Verify PHPSuExec

Discussion in 'General Discussion' started by jozeph, Apr 16, 2005.

  1. jozeph

    jozeph Well-Known Member

    Joined:
    Apr 16, 2004
    Messages:
    59
    Likes Received:
    0
    Trophy Points:
    6
    How can I verify if PHPSuExec is really working?
    I build apache with PHPSuExec support, but one of my users continue sending messages from nobody.
    After compile apache, I need to change more one thing?
     
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    tweek settings

    mail

    check box

    scripts generally run as nobody if you are not using phpsuexec and suexec respectively.)
     
  3. jozeph

    jozeph Well-Known Member

    Joined:
    Apr 16, 2004
    Messages:
    59
    Likes Received:
    0
    Trophy Points:
    6
    Maybe not working

    I think my PHPSuExec is not working.

    When I do:

    <?php
    // The message
    $message = "Line 1\nLine 2\nLine 3";

    // In case any of our lines are larger than 70 characters, we should use wordwrap()
    $message = wordwrap($message, 70);

    // Send
    mail('myemail@domain.com', 'My Subject', $message);
    ?>

    The FROM header is NOBODY@SERVERHOST.DOMAIN.COM. Is this normal whe using PHPSuExec?
     
  4. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    The true from header of a message sent from PHP when phpsuexec is running should have the value user@hostname.example.com.

    There are two things I can think of to check if phpsuexec is in operation:

    1. Check the output from the PHP function php_info() - the server API should be listed as CGI
    2. Change the permissions for a PHP script to 0777 and try to execute it - with phpsuexec this wouldn't work and you should get an internal server error
     
  5. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Well, when you have phpsuexec enabled correctly:

    /usr/bin/php -v

    Will give you PHP 4.3.11 (cgi) instead of PHP 4.3.11 (cli)

    Secondly, the mod_php4 module must have been disabled in httpd.conf:

    grep mod_php /etc/httpd/conf/httpd.conf
    #AddModule mod_php4.c

    I would suspect that you left selected the option to no build apache if it's already the same version when you enabled phpsuexec.
     
  6. jozeph

    jozeph Well-Known Member

    Joined:
    Apr 16, 2004
    Messages:
    59
    Likes Received:
    0
    Trophy Points:
    6
    hmmmm

    PHP show me (cli)... PHPSuExec is not running. Midnight I will try to recompile it.

    Just more one question. If mod_php is disabled, how apache will understand PHP tags "<? ?>" ? The functioning will continue normal?
     
  7. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Without mod_php, httpd uses an application handler that passes the .php pages to the php binary for processing.
     
Loading...

Share This Page