Learn WHM

The Web Host Manager will allow you to control your VPS/DS services via your Internet Browser!

• Last Updated: 03/01/2020
• ( 13 minutes reading )

How to use the MultiPHP Manager feature in WHM

Introduction

Having the ability to change the PHP versions with a single click is really useful, especially if you are hosting multiple websites on your server. The “MultiPHP Manager” feature was introduced as a part of the “EasyApache 4” functionality back in 2016, as prior to that, users were only able to have one PHP version on a WHM based server because the “EasyApache 3” software had limitations in that regard. 

The only way you could have different PHP versions was with third-party software such as CloudLinux. In addition to allowing an easy transition between different PHP versions, the “MultipePHP Manager” feature will give you the option of installing PHP FastCGI Process Manager (PHP-FPM) and configuring it on your server.  In this tutorial, we will be going through the process of applying different PHP versions and setting up the PHP-FPM service. Let’s get started.

 

Accessing the MultiPHP Manager feature

First, you need to log into the WHM service for your VPS or Dedicated Server. If you are not sure how to do that, please check our How to Access WHM tutorial. After you have logged in, please navigate to the search bar on the left side of the page and type “MultiPHP Manager”.

 

Accessing the MultiPHP Manager feature

 

When the functionality shows up below the search bar, please click on it so you can be sent to the “MultiPHP Manager” page.

 

Changing the PHP versions on your server

When you land on the “MultiPHP Manager” page You will see three tabs on the top. The “PHP Versions” tab, the “PHP Handlers” tab, and the “System PHP-FPM Configuration” tab. 

 

PHP Versions tab overview

 

The “PHP Versions” tab will be opened by default, so let’s go over all the options it provides.

 

PHP versions Tab

The first thing you are going to notice on the “PHP Versions” tab is the “System PHP Version” heading and underneath a brief explanation about the system default PHP version. Below this explanation, you will find the currently used system PHP version and on its right side an “Edit” link that will let you change the system PHP version to a different one. In order to change it, please press the “Edit” link.

 

System PHP Version

 

Upon pressing the “Edit” link a dropdown menu will show up in its place, allowing you to select a new system PHP version from the ones you have already installed on the server using. We have a wonderful tutorial on the matter which you should definitely check out. 

 

Selecting system default PHP Version

 

When you have selected the desired PHP version, please press the “Apply” button on the far right side of the dropdown menu.

Beneath this section, you will find the “System PHP-FPM” heading and under it the current status of the service. There will be two buttons next to the “System PHP-FPM Status” text. The first one is the “Turn On/Off” button. When pressed, this will turn on or will turn off the PHP-FPM service. On the right side of the “Turn On/Off” button, you will see the “Convert All Accounts to PHP-FPM” button. When it is pressed, all accounts that are currently utilizing this specific PHP version will have the PHP-FPM service enabled.

 

System PHP-FPM Status

 

Scrolling down the screen you will see the “Set PHP Version Per Domain” heading. Below that you will find a search field and a table section containing the domains on the server. Please use the search field to find a specific domain you want to change the PHP version for. The table section contains additional information about the domains so let’s go over it.

  • Domain - This will display the domain name on the server.
  • Account - This will display the account under which the domain name is added.
  • Account Owner - This will show the owner or the reseller of the account. Usually, this will be either “root” or the user itself.
  • PHP Version - This will be a dropdown menu that will display the current PHP version for the domain. If you want to change it, please click on the dropdown menu and select the desired version. The change will be applied immediately.
  • PHP-FPM - This column will contain the PHP-FPM status of the domain. It will be represented by a toggle switch and if you want to enable it you will need to position the switch so that the status is shown as “On”.

 

Set PHP Version per Domain section

 

To enable the PHP-FPM service on all domains, please use the checkbox located on the far left side of the table section. Analogically, you can do that with the PHP version. You will notice that there is a checkbox on the far left side of the table section for each domain as well. If you want to apply the PHP-FPM service or change the PHP version, select the domain by putting a tick in the checkbox.

When the desired domain names are selected, you may use the dropdown “PHP Version” and “PHP-FPM” menus located on the top right side, above the table section.



Apply PHP Version and PHP-FPM in bulk

 

In order to apply a specific PHP version, select it from the “PHP Version” dropdown and press the “Apply” button located on the right side of the menu. In order to configure whether the PHP-FPM service is On or Off, please use the dropdown “PHP-FPM” menu, select your desired option and press the “Apply” button located on the right side of the menu. 

 

PHP Handlers Tab

In order to access the “PHP Handlers” tab, please press the link located on the right side of the “PHP Versions” tab. The “PHP Handlers” tab will allow you to select a PHP handler for each PHP version. 

By default, apache does not natively support PHP scripts. In order to enable their use, a special module needs to be installed. This module tells Apache how to handle PHP scripts and is referred to as a PHP handler. Without a properly configured module, Apache will just send you the PHP file as a download since it does not have instructions to do other.

When you open the “PHP Handlers” tab you will notice a table section with all of the currently installed PHP versions on the server. The columns of the table will consist of:

  • PHP Version - The actual version of the PHP service.
  • PHP Handler - The type of handler that will be used for executing PHP scripts. 
  • Actions - The available actions you can perform for each of the listed PHP versions. 

 

PHP Handlers tab overview

 

 Let’s go over some of the handlers the WHM control panel support.

  • suPHP - This handler provides the ability to execute PHP scripts as the user with the mod_suphp Apache module. This module provides a flexible and secure way to serve PHP requests. This is the handler that comes by default on all our VPS and Dedicated Servers and we strongly recommend that you stick to it.
  • CGI - The CGI handler executes PHP applications through the mod_cgi or the mod_cgid Apache modules.  If mod_suEXEC is installed, the system will execute PHP applications with the user that owns the application. If it is not installed the system will use the “nobody” user which is the username of the Apache web service. This is considered the slowest PHP handler and is used very rarely.
  • DSO - This handler will execute PHP applications through the mod_php Apache module and the PHP DSO extension. It has a very small amount of overhead, thus it is extremely fast, however, you need to disable the apache MPM modules in order to use it. Having the MPM modules disabled could compromise the number of concurrent PHP requests the server can handle. Another downside of the DSO PHP handler is the fact that the user executing the PHP scripts is always the “nobody” user which can have implications for security.
  • lsPHP - This handler will execute all PHP applications through the mod_lsapi module for the Apache web service. It is using LiteSpeed technology and is designed for Speed, Performance, Stability, and Security in mind. It has all the security perks of the suPHP handler and on top of that allows you to benefit from opcode caching in the most optimal way. In addition to that, the PHP script executions are forked, instead of executed individually. This smoothes out the requests when the server is under a high load.

Note that each PHP version can support ONLY 1 PHP hander. In order to select a PHP handler for a specific PHP version, please press the “Edit” button on the corresponding row. 

 

Selecting PHP Handler

 

This will transform the record under the “PHP Handler” column into a dropdown menu, which you can use to select the desired PHP handler. Note that not all of the above will be present here, as they need to be installed first.

If you would like to use a specific PHP handler and it is not present inside this list, please contact our Technical Support Team over the ticketing system in your client area. They will be happy to help you out.

When you have selected the desired handler, please press the “Apply” button underneath the “Actions” column.

 

System PHP-FPM Configuration Tab

In order to access this tab, please press the “System PHP-FPM Configuration” tab, located on the right side of the “PHP Handlers” tab.

The “System PHP-FPM Configuration” tab will allow you to configure the system’s PHP-FPM pool options and php.ini directives. When you land there, the first thing you will see is the “PHP-FPM Configuration” section. 

This is the place where you set the following options:

  • Max Requests  - In this text field, please type in the maximum number of requests that may be forked at a time.
  • Process Idle Timeout - In this text field, please type in the period (in seconds) in which the PHP process will be timed out when it becomes idle.
  • Max Children - In this text field, please type in the number of children that will process PHP requests.

 

PHP-FPM Configuration section



The second section on this page will be the “PHP INI Directives” section. It will allow you to modify the behavior of the php.ini file based on your preference.

 

PHP INI Directives section

 

Let’s go over all of the available options in this section.

  • Treat URLs as files (allow_url_fopen) - Ticking this checkbox will enable the allow_url_fopen directive inside the php.ini file. By default, users will not be able to overwrite this directive. In order to allow them to do so, please press the “Unlock user override ability”, located on the right side of this checkbox.
  • Log errors (log_errors) - Ticking this will enable PHP applications to log errors inside the error_log files. By default, users will not be able to overwrite this directive. In order to allow them to do so, please press the “Unlock user override ability”, located on the right side of this checkbox.
  • Recognize code between <? and ?> tags as PHP source(short_open_tag) - Ticking this checkbox will enable the short_open_tag directive inside the php.ini file. By default, users will not be able to overwrite this directive. In order to allow them to do so, please press the “Unlock user override ability”, located on the right side of this checkbox.
  • Disabled functions (disable_fuinctions) - Please use this text field to type in comma-separated functions that will not be usable in PHP. By default, users will not be able to overwrite the values in this directive. In order to allow them to do so, please press the “Unlock user override ability”, located on the right side of this text field.
  • Report these errors(error_reporting) - In this text field, you can type in the level of error reporting you want to use for PHP (Notice, Warning, Deprecated, etc.). By default, users will be able to overwrite this directive. If you want to prevent them from doing si, please press the “Lock user override ability” button located on the right side of this text field.

When you are done applying the desired settings in this tab, please, press the “Save Configuration” button located on the bottom of the page. If you want to start over with the settings and you are not happy with the current ones, please press the “Reset Configuration” button located on the bottom of the page, on the left side of the “Return to PHP versions” link.

 

Saving PHP-FPM configuration

 

When the “Save Configuration” button is pressed a green bar will appear on the top right side of the screen, notifying you that the changes have been saved.

 

PHP-FPM configuration successfully saved screen

 

Here you go! All of the information concerning the “MultiPHP Manager” feature in the WHM control panel. It is really easy to navigate through and apply the needed settings for your domains. If you are having issues using it, please feel free to contact our Technical Team. They are 24/7 available through the ticking system in your Client Area.

 

 

...
Sebahat
Content Marketing Specialist

Sebahat is a young and bright woman who has become an invaluable part of our team. She started as a Customer Care Representative, mastering that role and, along the way, growing into a tech-savvy individual who is well acquainted with every support layer of the company. Driven by her aim to improve our customers’ experience constantly, she is committed to enhancing the extraordinary support we deliver.