Enable suphp in WHM server

ARUN Posted in PHP
0

Login to WHM >>

Main  >> Service Configuration >> Apache Configuration >> PHP and SuExec Configuration

suphp

ARUN Posted in PHP
0

When suphp is enabled we get  the username of the account running the apache process in   ” top -c ” command.

When dso is enabled and even suexec is enabled user will be nobody.

To see the username in top command use  cgi with SuExec On

View default php version on your server

ARUN Posted in PHP
0

View and change the default php version on your WHM sever.

Main >> Service Configuration >> Apache Configuration >> PHP and SuExec Configuration

You can also change and view Apache suEXEC status

Website when browsed gives option “save” rather than site being shown

ARUN Posted in PHP
0

If this is a WHM server make sure php handlers are setup correctly. (dso, cgi, suphp etc)

To correct this use

vi .htaccess

AddHandler application/x-httpd-php5 .php
IF IT IS PLESK

go to /var/www/vhost/domain.com/conf/httpd.include

Make sure

php_admin_flag engine on

Toggle php version in cpanel

ARUN Posted in PHP
0

If you have both php 4 and php 5 installed on your cpanel server and you want to set, say php 5 as default for all the clients. Login to

Cpanel >> php configuration

( This can be viewed only if php 4 and php 5 is installed using easy apache )

To find the path of loaded php.ini configuration file

ARUN Posted in LINUX COMMANDS, PHP
0

php -i | grep php.ini

Clear suphp logs (Solution for Php internal 500 error)

ARUN Posted in ERROR, PHP
0

cd /root/bin    (If no bin flder create one)

vi clear_suphp.sh

cd /usr/local/apache/logs
echo > suphp_log

save and exit

chmod 700 clear_suphp.sh

crontab -e

10 */1 * * * /bin/bash /root/bin/suphp_clear > /dev/null 2>&1                  (Will execute the cron in every 2hrs)

save and exit

service crond restart

PHP INFO

ARUN Posted in PHP
0
<?php
phpinfo();
?>