Child pages
  • MultiPHP Manager for WHM
This documentation is for cPanel & WHM version 80 EDGE builds.  The "RELEASE" version of our documentation can be found in the Version 78 Documentation space.


Skip to end of metadata
Go to start of metadata

(WHM >> Home  >> Software >> MultiPHP Manager)

Overview

This interface allows you to easily manage the PHP and PHP-FPM configurations of your system and your cPanel accounts. In this interface, you can manage the PHP version, PHP-FPM setting, pool options, and PHP INI directives of any virtual host that you own.

Note:

To remove the CloudLinux™ promotions, log in to your Manage2 account, navigate to the Update Company Information section. Then, select the Disabled button next to the Purchase CloudLinux Url or email address option. You can only disable this option if you possess a Partner account.


The PHP Version tab

The PHP Version tab allows you to select the System PHP version, the version of PHP for each domain, and to manage PHP-FPM on each domain.

The System PHP version section

The system PHP version refers to the version of PHP that functions as the global default for all accounts. Only the system administrator can set the System PHP version. When you create a new account, the account uses this version of PHP by default. Also, any primary domain that you set to Inherit will use the System PHP Version. For more information, read our PHP Inheritance documentation. 

To change the system default PHP, perform the following steps:

  1. Click Edit in the System PHP Version section.
  2. Select your desired PHP version from the menu.
  3. Click Apply

Notes:

  • When you change the system default PHP version, the interface writes to the /etc/cpanel/ea4/php.conf file. The system logs any changes made to this file to the /etc/cpanel/ea4/php.conf.bak/TIME.PID file, where TIME represents the time the system made the change and PID represents the process PID. The system only keeps the 20 most recent php.conf file changes.

The System PHP-FPM section

PHP FastCGI Process Manager (PHP-FPM) provides an alternative PHP module that allows a website to handle strenuous loads on sites. PHP-FPM maintains pools (workers available to respond to PHP requests) to accomplish this. These pools of workers allow the website to handle more requests than it normally could.

In cPanel & WHM, PHP-FPM is enabled by default as long as the system meets the RAM requirements listed in the warning below. System administrators can disable or enable PHP-FPM for all cPanel user accounts with this interface.


Warning:

We strongly recommend that you only activate Apache PHP-FPM if your server has at least 2 GB of RAM available, or at least 30 MB of RAM per domain. If you enable PHP-FPM on a server with less than the required RAM, your server may experience severe performance issues.

Disable System PHP-FPM Status

To disable System PHP-FPM Status, click Turn Off next to System PHP-FPM Status in the System PHP-FPM section. Your status will now display as Off. Also, PHP-FPM will default to disabled for all new accounts that you create.

Enable System PHP-FPM Status

To enable System PHP-FPM Status, perform the following steps:

  1. In the System PHP-FPM section, click Turn On next to System PHP-FPM Status. The system will display the Convert All Accounts to PHP-FPM button.

  2. To convert all of your accounts to PHP-FPM, click Convert All Accounts to PHP-FPM. The system will display a message that it has started the conversion process. 

    Notes:

    • If your PHP version does not match the required PHP-FPM installed packages, the system will not allow you to convert all of your accounts to PHP-FPM.
    • When enabled, the system automatically enables PHP-FPM for new accounts, domains, subdomains, and addon domains that you create.

If you wish to see the conversion log, click the link in the success message.

The Set PHP Version Per Domain section

Warning:

Incorrect ownership of an .htaccess file may cause failures when you change an account's PHP version. The cPanel user account must own the .htaccess file that you want to change, and that file must use 644 permissions.

Set the PHP Version for selected domains

You can change the PHP version for selected domains at one time. To do so, perform the following steps:

  1. Select the checkbox next to the domains that you wish to edit.
  2. Select the desired version of PHP from the PHP Version menu. If you want the account to always use the parent domain's PHP version, select Inherit. An account that you set to Inherit with no parent domain uses the system default.

    Note:

    You can use Inherit only when you have disabled PHP-FPM for the domain.

  3. Click Apply to change the selected domains' PHP version.

Notes:

  • If you enabled PHP version restrictions on an account, all installed PHP versions still appear in this interface. For more information, read our How to Restrict a User's PHP Versions documentation.

  • If you enabled PHP-FPM on a domain and you change the domain's PHP version, the system will change the domain's PHP-FPM version to match the selected PHP version. If PHP-FPM is not enabled on your domain, the system changes the PHP and PHP-FPM versions separately.

Configure PHP-FPM for selected domains

You can also toggle the PHP-FPM setting for selected domains from this section. To do so, perform the following steps:

  1. Select the checkbox next to the domains that you wish to change.
  2. From the PHP-FPM menu, select On to enable PHP-FPM or Off to disable it.

  3. Click Apply.

Note:

When you transfer domains between servers, the destination server will not inherit the source server's PHP-FPM setting. For more information on how to correct this, read our PHP-FPM documentation.

The domains table

In EasyApache 4, each domain or virtual host can use any currently-installed PHP version or currently-installed PHP-FPM setting. These domains are listed in the domains table in the PHP Versions tab.

The domains table displays the following information:

  • Domain — The domain's name.
  • Account — The domain's cPanel account username.
  • Account Owner — The reseller or root user who owns the account.
  • PHP Version — The PHP version that the domain currently uses, or whether the account inherited its PHP version.
  • PHP-FPM — The domain's PHP-FPM status. If set to On, the interface shows the Edit PHP-FPM button.

Note:

The system does not list aliases (parked domains) in the domains table.

You can manage a domain's PHP Version and PHP-FPM settings from their row in the domains table.

Select a PHP Version

To select a domain's PHP version, perform the following steps:

  1. Search for the domain whose PHP version you wish to edit.
  2. Select the desired version of PHP from the PHP Version menu in that row. If you want the account to always use the parent domain's PHP version, select inherit. An account that you set to inherit with no parent domain uses the system default.
  3. The system will automatically update the PHP version once you select it. While the system applies the changes, your mouse pointer may become inactive.

Set a domain's PHP-FPM setting

Important:

If you select a domain with the PHP version set to Inherit, the system will not allow you to set PHP-FPM for that domain. You must either select a PHP version other than Inherit or not use PHP-FPM.

You can toggle a domain's PHP-FPM setting for the domain from its row in the domains table. To do so, perform the following steps:

  1. Search for the domain whose PHP-FPM setting you wish to edit.
  2. From the PHP-FPM column in the domains table, set the toggle to On to enable PHP-FPM or to Off to disable it.

Set a domain's PHP-FPM configuration

The Domain PHP-FPM Configuration interface allows you to configure a domain's PHP-FPM pool options and php.ini directives. To access this interface, click Edit PHP-FPM. This button appears at the end of a domain's row when you enable PHP-FPM for that domain. When you access the Domain PHP-FPM Configuration interface, the interface renames and replaces the contents of the PHP Version tab.

The tab contains two sections, PHP-FPM Pool Options and PHP INI Directives.

You can edit these options at the system level from the System PHP-FPM Configuration tab (WHM >> Home >> Software >> MultiPHP Manager >> System PHP-FPM Configuration tab).

PHP-FPM Pool Options

The PHP-FPM Pool Options section allows you to set automated pools (workers) for the specified domain. If you did not previously configure these settings, the interface will display the system pool option settings. 

Note:

Apache limits the performance of PHP-FPM pool options. Apache's configuration settings for pool options must match the PHP-FPM service's configuration settings. For more information, read our Apache vs PHP-FPM Bottleneck with Child Processes documentation.

To set a domain's pool options, perform the following steps:

  1. Click Edit PHP-FPM. The system will open the Domain PHP-FPM Configuration interface.

  2. In the PHP-FPM Pool Options section, enter your desired options for Max ChildrenProcess Idle Timeout, and Max Requests. The table below shows the default values and limits for each option. If you have changed the system values from their default setting, then the system will display the system values.

    Pool OptionsDefault (in seconds)Limit
    Max Children51-10,000
    Process Idle Timeout101-10,000,000
    Max Requests201-10,000,000

    Note:

    You must enter pool option limits that are 1,000 or over without commas in the text box. We show commas in these examples for legibility.

  3. Click Save Configuration at the end of the form to save your changes. The system will display a success message.

PHP INI Directives

The PHP INI Directives section allows you to configure the available php.ini directives for the specified domain. You can also toggle a user's ability to override the system's directive settings. You can manage the following settings:

DirectiveDescriptionPossible ValuesExample
allow_url_fopenUsers can treat URLs as files.
  • Select the checkmark — On
  • Deselect the checkmark — Off
N/A
log_errorsUsers can log errors.
  • Select the checkmark — On
  • Deselect the checkmark — Off
N/A
short_open_tagThe system can recognize code between the <? and ?> tags as a PHP source.
  • Select the checkmark — On
  • Deselect the checkmark — Off
N/A
doc_root

The PHP pages' document root.

Note:

You can edit this setting for the domain level only.

A valid filename path.

[% documentroot %]

Note:

  • When you specify a vhost document root for subdomains, the system does not escape the vhost correctly in the subdomain's PHP-FPM configuration file.
  • PHP-FPM does not process certain characters in the document root unless you add double quotes ("") around the document root.
  • You can also add the colon(:), semicolon (;), and parenthesis (()) characters to the document root.
error_log

The error log's filename.

Note:

You can edit this setting for the domain level only.

A valid log file name.

example_com.php.error.log

Note:

The system normalizes the period character (.) to an underscore character (_) for the domain. 
For example, the /home/example/logs/example.net.php.error.log file becomes the /home/example/logs/example_net.php.error.log file, where example represents the username and example_net represents the domain name.

disable_functionsLists the PHP functions to disable.A valid function or functions.exec,passthru,shell_exec,system
error_reportingThe errors rules that the system will ignore or report on.A valid error.E_ALL & ~E_NOTICE


To manually configure additional php.ini directives, read our How to Manage Your php.ini Directives with PHP-FPM documentation. For a complete list of PHP-FPM user pool directives, read our Configuration Values of PHP-FPM documentation.

The PHP Handlers tab

Note:

PHP handlers does not apply to PHP-FPM.

In EasyApache 4, each PHP version can use its own PHP handler. The PHP Handlers tab allows you to select the PHP handler that each version of PHP uses.

The list of PHP versions shows:

  • An installed PHP version.
  • The PHP handler that the PHP version uses.

To change the handler that a PHP version uses, perform the following steps:

  1. Click Edit next to the version of PHP whose handler you wish to change.
  2. Select the PHP handler from the menu.

    Notes:

    • The menu only shows the PHP handlers that are compatible with your selected version of PHP.

    • You can only use the DSO handler with one version of PHP.

  3. Click Apply.

    Note:

    When you change a PHP version's handler, the interface writes to the /etc/cpanel/ea4/php.conf file. The system logs any changes made to this file to the /etc/cpanel/ea4/php.conf.bak/TIME.PID file, where TIME represents the time the system made the change and PID represents the process PID. The system only keeps the 20 most recent php.conf file changes.

The System PHP-FPM Configuration tab

The System PHP-FPM Configuration tab allows you to configure the system's PHP-FPM pool options and php.ini directives. The tab contains two sections, PHP-FPM Pool Options and PHP INI Directives. 

You can configure domain-level pool options and PHP INI directives through the Edit PHP-FPM button in the domains table. You can find the domains table in the PHP Version tab (WHM >> Home >> Software >> MultiPHP Manager >> PHP Version tab).

Note:

The PHP-FPM configuration settings at the domain level will retain their customized settings, even when you edit the system PHP-FPM configuration settings.

PHP-FPM Pool Options

The PHP-FPM Pool Options section allows you to set automated pools (workers) for all of the domains in your local server. If you did not previously configure these settings, the interface will display the system pool option settings. 

Note:

Apache limits the performance of PHP-FPM pool options. Apache's configuration settings for pool options must match the PHP-FPM service's configuration settings. For more information, read our Apache vs PHP-FPM Bottleneck with Child Processes documentation.

To set the system's pool options, perform the following steps:

  1. Select the System PHP-FPM Configuration tab.

  2. In the PHP-FPM Pool Options section, enter your desired options for Max ChildrenProcess Idle Timeout, and Max Requests. The table below shows the default values and limits for each option.

    Pool OptionsDefaultLimit
    Max Children51-10,000
    Process Idle Timeout101-10,000,000
    Max Requests201-10,000,000

    Note:

    You must enter pool option limits that are 1,000 or over without commas in the text box. We show commas in these examples for legibility.

  3. Click Save Configuration at the end of the form to save your changes. The system will display a success message.

PHP INI Directives

The PHP INI Directives section allows you to configure the available php.ini directives for all of the domains in your local server. You can also toggle a user's ability to override the system's directive settings. This interface allows you to manage the allow_url_fopenlog_errorsshort_open_tag, doc_rooterror_log, disable_functions, and error_reporting directives.

DirectiveDescriptionPossible ValuesExample
allow_url_fopenUsers can treat URLs as files.
  • Select the checkmark — On
  • Deselect the checkmark — Off
N/A
log_errorsUsers can log errors.
  • Select the checkmark — On
  • Deselect the checkmark — Off
N/A
short_open_tagThe system can recognize code between the <? and ?> tags as a PHP source.
  • Select the checkmark — On
  • Deselect the checkmark — Off
N/A
doc_root

The PHP pages' document root.

Note:

You can edit this setting for the domain level only.

A valid filename path.

[% documentroot %]

Note:

  • When you specify a vhost document root for subdomains, the system does not escape the vhost correctly in the subdomain's PHP-FPM configuration file.
  • PHP-FPM does not process certain characters in the document root unless you add double quotes ("") around the document root.
  • You can also add the colon(:), semicolon (;), and parenthesis (()) characters to the document root.
error_log

The error log's filename.

Note:

You can edit this setting for the domain level only.

A valid log file name.

example_com.php.error.log

Note:

The system normalizes the period character (.) to an underscore character (_) for the domain. 
For example, the /home/example/logs/example.net.php.error.log file becomes the /home/example/logs/example_net.php.error.log file, where example represents the username and example_net represents the domain name.

disable_functionsLists the PHP functions to disable.A valid function or functions.exec,passthru,shell_exec,system
error_reportingThe errors rules that the system will ignore or report on.A valid error.E_ALL & ~E_NOTICE


To manually configure additional php.ini directives, read our How to Manage Your php.ini Directives with PHP-FPM documentation. For a complete list of PHP-FPM user pool directives, read our Configuration Values of PHP-FPM documentation.

Additional documentation