rebuild PHP configuration in cPanel

change php handler settings cpanel

as cPanel says PHP handlers deliver PHP programming libraries. each of them deliver the libraries through different files and implementation which of course affects the Apache performance. well actually PHP handlers determine how Apache should servers PHP on a server.

in This tutorial I’m going to show you step by step How to change you PHP handler in a cPanel  server using either SSH or WHM.

How To Change PHP Handler in WHM/cPANEL:

To change and create a new php configuration file with a different handler type through WHM simply login to your WHM and look for “Configure PHP and suEXEC” from the left menu! to make it easier just type PHP in the “FIND” feature to filter the results for the word PHP.

change php handler settings cpanel

 

After opening Configure PHP and suEXEC you will be seen a page like the picture in left side.

Under “Current Configuration” you will be seen your current php.conf file info! the version of PHP you are using and the current handler.

You will be also seeing the status of mod suEXEC and mod Ruid2.

well to change the handler using WHM interface simply select the version of PHP and Handler you want to choose and then click on Save New Configuration button.

After changing the Handler through WHM Apache will be automatically restarted.

How to Change PHP Handler Settings using SSH in CPANEL SERVERS:

To change the handler settings using SSH use “/usr/local/cpanel/bin/rebuild_phpconf” script.

after running this script you will be seen the help menu of it. to see your current PHP configuration using SSH use

/usr/local/cpanel/bin/rebuild_phpconf –current

 

change php handler settings cpanel

As you see in the image above my server is running under PHP5, suphp and with SUEXEC enabled! This command also shows you the available handlers for you to choose! so lets say we want to change our handler to FCGI using PHP5 and with SUEXEC ON.

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

 

following command says to the system to use PHP 5. with no PHP4 Handler and FCGI for PHP5 Handler and SUEXE to be enabled!

Here is the format to use this script!

Usage: /usr/local/cpanel/bin/rebuild_phpconf [--dryrun] [--no-restart] [--no-htaccess] [--current|--available] <Default PHP> <PHP4 Handler> <PHP5 Handler> <Suexec>

 

Incoming search terms:

  • cpanel choose php ruid2
  • cpanel rebuild apache config
  • godaddy rebuild php with cpanel
  • how to change fcgi or suphp cpanel in ssh
  • how to rebuild my apache config via ssh
  • php configuration ssh cpanel
  • rebuild cpanel php
  • whm fast cgi service temporary unavailable

Leave a comment

Leave a Reply