This document lists the PHP-FPM system’s configuration settings and their default values. This document also explains how to add additional settings to your system’s PHP-FPM configuration.
You can configure some of the global directives and pool options through WHM’s MultiPHP Managerinterface (WHM » Home » Software » MultiPHP Manager).
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.
Global directives
cPanel & WHM uses template values for defaults. For example, when the [% ea_php_version %] template value appears in the .yaml file, the system replaces this value with the desired PHP version. The following list outlines the global directives labels:
Key — The entry in the .yaml file.
Name — The pool name in the /var/cpanel/ApachePHPFPM/system_pool_defaults.yaml configuration file.
MoreFor more information about pool names, read our PHP-FPM Domain Pools documentation.
Present if not listed — When you set this value to Yes, the system adds the value to the /var/cpanel/userdata/user/domain.php-fpm.yaml configuration file, where user represents the cPanel user’s name and domain represents the domain.
Default — The template value that resides in the /var/cpanel/ApachePHPFPM/system.yaml configuration file. For more information about creating the /var/cpanel/ApachePHPFPM/system.yaml file, read our PHP-FPM implementation documentation.
Warning
You must normalize the period character . to an underscore character _ for all key names when you create or modify the /var/cpanel/ApachePHPFPM/system.yaml file. For example, you would normalize syslog.ident to syslog_ident. Otherwise, the system may not accept the key name.
Exercise extreme caution when you manually edit .yaml files. Incorrect syntax in these files will cause services to fail. We strongly suggest that you create a backup of your system before you manually edit .yaml files.
PHP-FPM pools allow you to configure different websites and applications to run under their own user. The following table lists directives that you can configure in the /var/cpanel/ApachePHPFPM/system_pool_defaults.yaml file. For more information about creating the /var/cpanel/ApachePHPFPM/system_pool_defaults.yaml file, read our PHP-FPM implementation documentation.
Important
To avoid directive configuration errors, you must follow these syntax rules:
You must use single quotation marks ' ' at the beginning and end of strings with double quotation marks " ". The YAML parser automatically removes quotation marks from string values. This means that values that require double quotation marks must use single quotation marks before and after the double quotation marks to retain their value.
You must use an escape character \ with any double quotation marks " " that you use inside of the string.
Key
Name
Present if not listed
Default
catch_workers_output
catch_workers_output
Yes
yes
chdir
chdir
Yes
[% homedir %]
chroot
chroot
No
N/A
clear_env
clear_env
No
N/A
group
group
Yes
nobody
listen
listen
Yes
"[% socket_path %]"
listen_acl_groups
listen.acl_groups
No
N/A
listen_acl_users
listen.acl_users
No
N/A
listen_allowed_clients
listen.allowed_clients
No
any
listen_backlog
listen.backlog
No
-1
listen_group
listen.group
No
nobody
listen_mode
listen.mode
No
0660
listen_owner
listen.owner
No
"[% username %]"
php_admin_flag_allow_url_fopen
php_admin_flag[allow_url_fopen]
Yes
on
php_admin_flag_log_errors
php_admin_flag[log_errors]
Yes
on
php_admin_value_disable_functions
php_admin_value[disable_functions]
Yes
exec,passthru,shell_exec,system
php_admin_value_doc_root
php_admin_value[doc_root]
Yes
[% 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.
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.
php_admin_value_short_open_tag
php_admin_value[short_open_tag]
Yes
on
php_value_error_reporting
php_value[error_reporting]
Yes
E_ALL & ~E_NOTICE
php_value_session_save_handler
php_value[session.save_handler]
No
N/A
php_value_session_save_path
php_value[session.save_path]
No
N/A
php_value_soap_wsdl_cache_dir
php_value[soap.wsdl_cache_dir]
No
N/A
ping_path
ping.path
Yes
/ping
pm
pm
Yes
ondemand
pm_max_children
pm.max_children
Yes
5
pm_max_requests
pm.max_requests
Yes
20
pm_max_spare_servers
pm.max_spare_servers
Yes
5
pm_min_spare_servers
pm.min_spare_servers
Yes
1
pm_process_idle_timeout
pm.process_idle_timeout
Yes
10
pm_start_servers
pm.start_servers
Yes
0
pm_status_path
pm.status_path
Yes
/status
request_slowlog_timeout
request_slowlog_timeout
No
N/A
request_terminate_timeout
request_terminate_timeout
No
N/A
rlimit_core
rlimit_core
No
N/A
rlimit_files
rlimit_files
No
N/A
security_limit_extensions
security.limit_extensions
Yes
The system allows the following options:
.phtml
.php
.php3
.php4
.php5
.php6
.php7
slowlog
slowlog
No
N/A
user
user
Yes
"[% username %]"
Note
For more information about pool names, read our PHP-FPM Domain Pools documentation.
Add a value to a configuration
A complete configuration directive line would resemble the following example:
php_admin_value_ldap_max_links represents the Key entry.
The Key entry must only contain letters, numbers, and underscores.
php_admin_value[ldap.max_links] represents the pool name.
-1 represents the configuration value.
Important
If you prepend any PHP settings with the php_value or php_flag flags, the system will overwrite any previous php.ini values that you set in the user’s .htaccess files. To remove these flags, run the following commands:
If you prepend any PHP settings with the disable functions or disable_classes flags, the system will append the new php.ini value to the previous one in the user’s .htaccess files. For more information, read our How to Manage Your php.ini Directives with PHP-FPM documentation.