How to check PHP handler in cPanel/WHM ?

How to check PHP handler in cPanel/WHM ?

PHP handler :
A PHP handler defines the method that Apache uses to communicate back and forth with PHP scripts. A php handler loads the php modules and that determines how the php pages loaded on the server. Different types of available PHP handlers are suPHP, DSO, CGI FastCGI.
On Linux server we can change php handler through WHM > Service Configuration > Configure PHP and suEXEC easily but to list and change the active PHP handler through command line option.

Login to server as root through SSH:

1). To check currently used Apache PHP Handler
-----
/usr/local/cpanel/bin/rebuild_phpconf –current
-----
[root@hoststud ~]# /usr/local/cpanel/bin/rebuild_phpconf --current
Available handlers: suphp dso fcgi cgi none
DEFAULT PHP: 5
PHP4 SAPI: none
PHP5 SAPI: fcgi
SUEXEC: enabled
RUID2: not installed


2) To check Available Apache PHP Handler into the server
-----
/usr/local/cpanel/bin/rebuild_phpconf –available
-----
[root@hoststud ~]# /usr/local/cpanel/bin/rebuild_phpconf --available
Available handlers: suphp dso fcgi cgi none
PHP4 SAPI: not installed
PHP5 SAPI: cgi-fcgi
SUEXEC: available
RUID2: not available


3). To set default Apache PHP Handler to dso
-----
/usr/local/cpanel/bin/rebuild_phpconf 4 dso none 1
-----

4). To set default Apache PHP Handler to SuPHP
-----
/usr/local/cpanel/bin/rebuild_phpconf 5 none suphp 1
-----

5). To set default Apache PHP Handler to cgi
-----
/usr/local/cpanel/bin/rebuild_phpconf 5 none cgi 1
-----
Author
bhawanisingh
Views
3,867
First release
Last update
Rating
0.00 star(s) 0 ratings
Top