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.

EasyApache and PHP as user...

Discussion in 'EasyApache' started by vichardy, Sep 28, 2010.

  1. vichardy

    vichardy Member

    Joined:
    Apr 21, 2010
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    I'm looking to rebuild apache and in turn run PHP as users.

    Reading the information so far implies an option to say "PHP as user" however I cannot see this at all, I can see the suPhp option which I can tick... should I worry about the Safe PHP CGI option as well?

    Or if I have suPHP that is enough...???
     
  2. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    suPHP is recommended

    suPHP will run each PHP script as the cPanel account user.

    Some considerations when using suPHP is that all PHP-related files (scripts and data) and directories in the account must be owned by the account user and group, files must have 644 permissions, and directories must have 755 permissions. The permissions can be even more restrictive, but must not be more permissive than 644 for files and 755 for permissions.

    We recommend using suPHP as your PHP handler, because it runs each script as the cPanel account user, and this can greatly ease troubleshooting in the case of a script that is consuming too many resources or engaging in malicious activity such as sending spam.
     
  3. vichardy

    vichardy Member

    Joined:
    Apr 21, 2010
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Yeah, permissions are set as such.
    I watched "top" while accessing my site and saw the account name coming up finally. I guess it's happened to quick/fast before for me to see it actually running PHP as the user.

    :)
     
  4. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    suphp_log

    You can also watch the suphp_log file:

    Code:
    # tail -f /usr/local/apache/logs/suphp_log
    This will show you every script that is executed by suPHP, with the user and group. It will be easier to see your script running by watching the log than by trying to see it using top.

    Use Ctrl+C to stop the tail -f command.
     
Loading...

Share This Page