Child pages
  • PHP-FPM Code and FileSystem Layout for EasyApache 4

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

PHP-FPM provides an alternative FastCGI daemon for PHP that allows a website to handle significant loads. It allows a host to set specific amounts of resources to process a domain's requests via workers available to respond to PHP requests (pools). These pools allow a website to process more requests .than a typical 

PHP-FPM functions more quickly faster than traditional CGI-based methods, such as SUPHP, for multi-user PHP environments. It does not overload a system's memory with PHP requests from Apache processes, such as the ruid2+php-dso process. PHP-FPM only executes PHP requests, which enables it to service content quicker than other methods.

...

Each file contains different directives from the built-in values. Include PageLIB:_YAMLwarningLIB:_YAMLwarning 

Note
titleNotes:
  • The system does not require these files to run because since the built-in defaults enable the PHP-FPM to run sufficiently. 
  • Only include the differences in directives within these files.

The following example displays the system.yaml file's contents:

Code Block
linenumberstrue
---
daemonize: yes

This example only uses a different value than the built-in default for the daemonize setting. The system-pool-defaults.yaml file also performs this action, but applies the value to each pool that you create. Each domain in the system requires that you create one pool. Some fields use unacceptable characters such as quotation marks ( ""), periods (.), angle brakcets ([]), and parenthesis (()) for " for internal reasons, but you must substitute them with an underscore (_)

The table below contains examples of unacceptable value names:

Old NameNew Name
syslog.facilitysyslog_facility
php_admin_value[disable_functions]php_admin_value_disable_functions


Note
titleNote:

If you prepend any PHP settings with the with the disable functions or disable_classes flag, the system will append the new php.ini value to the previous one in the user's .htaccess files. For more information, read securephp.net's FastCGI Process Manager (FPM) documentation.

The filesystem configuration files

...

Note
titleNotes:
  • Do not edit these configuration files manually.
  • The system repeats these configuration files for each version that you select.
  • The /opt/cpanel/ea-php54/root/etc/php-fpm.d/[domain].conf file displays ea-php54 or php54 as its version.
  • You must change ea-php54 to the version that on which your system currently runs. For example, if your system runs on PHP version 5.5 or 5.6, change ea-php54 to ea-php55 or ea-php56.

...

FileDescription
/var/cpanel/userdata/[user]/[domain].php-fpm.yaml

This file controls a specific domain's pool. The file system uses the built-in default values and the and system_pool_defaults values to generate the [domain].conf file.

...

Use the following optional files only if you wish to to change the default parameters:

FileDescription
/var/cpanel/ApachePHPFPM/system.yaml

This file contains system - level settings.

The system also uses this file to generate the /opt/cpanel/ea-php5?/root/etc/php-fpm.conf file, where the ? character indicates that the system uses this file to generate all of the PHP versions in the php-fpm.conf file.

/var/cpanel/ApachePHPFPM/system_pool_defaults.yaml

The system uses this file to generate each domain's pool and configure each user's pool.

Warning
titleImportant:

If you edit a user's pool in WHM's MultiPHP Manager for WHM interface (WHM >> Home >> Software >> MultiPHP Manager), the system no longer applies the system default settings to that user.



Note
titleNote:

All domain pools use these defaults unless a .yaml file overrides them.

...

Warning
titleWarning:

We do not recommend that you perform yum remove operations with any ea-php RPMs. If you remove PHP from your system while any of your hosted websites still use it, those websites will display errors. In addition, Apache could fail to display the website entirely. Before you perform a yum remove operation, confirm that none of your hosted websites use the PHP version that you wish to remove with WHM's MultiPHP Manager interface (WHM >> Home >> Software >> MultiPHP Manager).

...