Command-line option to list the current PHP handler on the server – cPanel

A php handler loads the php modules and that determines how the php pages loaded on the server. Different types of php handlers are CGI, DSO, suPHP, & FastCGI. In a cPanel server, we have a command-line option to list the current working handler.

Steps to list the php handler from command-line:

Step 1 : Login to the server as root user.
Step 2 : Execute the command;

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

Example:

[email protected] [~]# /usr/local/cpanel/bin/rebuild_phpconf --current
Available handlers: suphp dso cgi none
DEFAULT PHP: 5
PHP4 SAPI: none
PHP5 SAPI: suphp
SUEXEC: enabled
RUID2: not installed

The above command also lists the available php handlers. Also, you can use the below command for available php handlers. 🙂

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

Example:

[email protected] [~]# /usr/local/cpanel/bin/rebuild_phpconf --available
Available handlers: suphp dso cgi none
PHP4 SAPI: not installed
PHP5 SAPI: cgi-fcgi
SUEXEC: available
RUID2: not available

That’s it..! 🙂

 

Related:
How to change php handler from backend on cPanel server
How to change PHP handler from SuPHP to FastCGI in a cPanel server

Post navigation

Arunlal Ashok

Operations Engineer at Endurance International Group. Linux lover. Like to play on Linux console. I started this blog to share and discuss Linux thoughts.

Always happy for an open discussion! Write to arun (@) crybit (dot) com. Check about me for more details. About this blog and our strong members, check The team CryBit.com
We like to travel. Our travelogues are published at Trip Mentor

Leave a Reply

Your email address will not be published. Required fields are marked *