cPanel

Change PHP handler via backend in cPanel

Change PHP handler
Change PHP handler

Change PHP handler via backend in cPanel

PHP handlers are necessary for everyday function of your server and determine how a PHP process is loaded on your server. A PHP handler is the one that deliver the PHP programming libraries. It determines how Apache serves PHP, hence it affects Apache’s performance. There are four PHP handlers available on cPanel.

SuPHP
FastCGI
DSO
CGI

In that, the FastCGI is not enabled by default. You need to enable the [highlight color=”green”]mod_fcgid[/highlight] via EasyApache to get this done. You can get the current settings by using the following command.

 
/usr/local/cpanel/bin/rebuild_phpconf --current

To get the available handlers:

 
/usr/local/cpanel/bin/rebuild_phpconf --available

Please use the following syntax to change PHP handler via backend.

 
/usr/local/cpanel/bin/rebuild_phpconf <Default PHP> <PHP4 Handler> <PHP5 Handler> <Suexec>

/usr/local/cpanel/bin/rebuild_phpconf <5/none> <suphp/fcgi/dso/cgi/none> <suphp/fcgi/dso/cgi/none> <0/1>

Below is the example to change PHP handler to FCGI on PHP 5

 
/usr/local/cpanel/bin/rebuild_phpconf 5 none fcgi 1

This means:

Default PHP 5
PHP 4 Handler none
PHP 5 Handler fcgi
Apache suEXEC on

To change the current php handler to DSO:

 
/usr/local/cpanel/bin/rebuild_phpconf 4 dso none 1

To change the current php handler to SuPHP:

 
/usr/local/cpanel/bin/rebuild_phpconf 5 none suphp 1

To change the current PHP handler to CGI:

 
/usr/local/cpanel/bin/rebuild_phpconf 5 none cgi 1

That’s it!

Read More:

If you like the post and wish to receive more articles from us, please like our FB page: If you like this post and wish to receive more articles from us, please like our FB page: Button

Your suggestions and feedbacks will encourage us and help to improve further, please feel free to write your comments.

For more details on our services, please drop us an E-mail at info@grepitout.com

Add Comment

Click here to post a comment

Topics