I posted this recently in another thread, so I'll reply with the steps I noted there for switching to suPHP. Of note, only use these steps if going to suPHP (do not process these if you are on DSO).
- Change all permissions for folders from 777 to 755
Code:
find /home/*/public_html -type d -exec chmod 755 {} \;
- Change all permissions for files from 666 to 644
Code:
find /home/*/public_html -type f -exec chmod 644 {} \;
- Fix ownership to public_html contents to user:user (rather than user:nobody), but keep top level of public_html as user:nobody
See this location for why to be careful about using a recursive chown to fix these ownership issues. Use the steps noted at this post as a guide for how to fix such ownership issues.
- Remove any php_value and php_flag entries in .htaccess files as they will produce an Internal Server Error if in an account's .htaccess file. Here are the commands to find all such files:
Code:
find /home -type f -name '.htaccess' -exec grep -Hrn 'php_value' '{}' \;
find /home -type f -name '.htaccess' -exec grep -Hrn 'php_flag' '{}' \;
After those php_flag and php_value lines have been removed from any .htaccess, then any accounts needing the values set in their own php.ini file could be done using:
Code:
cp /usr/local/lib/php.ini /home/username/public_html/php.ini
chown username:username /home/username/public_html/php.ini
Then edit the php.ini file to change to the new values, and point the .htaccess on that account to use that php.ini file:
Code:
suPHP_ConfigPath /home/username/public_html/
In these examples, replace username with the actual cPanel username.
Also, under FCGI for the RAM usage, you could have used FcgidMaxRequestInMem to limit those PHP processes from using so much memory:
http://httpd.apache.org/mod_fcgid/mo...axrequestinmem
There are several other limiters there. For DSO and suPHP, you can use RLimitMEM to limit memory:
http://httpd.apache.org/docs/2.2/mod...html#rlimitmem
If your RAM usage is this high, either limiting memory usage or tracking down the account(s) causing it would be in order.