Saturday, August 23, 2008

Simply check server is SuExec or not?

From your shell run following command

[root@xx.xx.xx.xx ~]#/usr/local/cpanel/bin/rebuild_phpconf --current

DEFAULT PHP: 5
PHP4 SAPI: suphp
PHP5 SAPI: suphp
SUEXEC: enabled


or make a php file under any account and change the permissions on that file to 777 and open it in a browser. If it gives 500 Internal Server Error, your most probably running suPHP.

Alternatively,
If you have access to WHM - login, in the menu find Configure PHP and SuExec
Check the drop down box for "PHP 4/5 Handler" - and if beside that it says "suPHP" - then your server is running it.

SuPHP activity is logged in /usr/local/apache/logs/suexec_log. If you tail it, you will see if there is any current activity:
Code:
tail -f /usr/local/apache/logs/suexec_log

you can also get this information from PHP INFO page:

IF

Server API = Apache then server is not running PHP in SuExec mode

And if

Server API = CGI the server is running PHP in SuExec mode

That’s all now you are sure about your server is SuExec or not

Also refer following blog to collect more information http://theperfectarts.com/

No comments: