Page tree

Versions Compared

Key

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

Include Page
LIB:_Version68
LIB:_Version68

Table of Contents
stylenone

Overview

The /usr/local/cpanel/scripts/php_fpm_config script installs configuration files when you manually edit the PHP-FPM configuration files. This script also helps to troubleshoot problems in the PHP-FPM system.

Note
titleNote:

Only users with root privileges may run this script.

The /usr/local/cpanel/scripts/php_fpm_config script

To use this script, run the following command as the root user:

Code Block
languagebash
/usr/local/cpanel/scripts/php_fpm_config --rebuild [--domain=domain] --check [--json]

Arguments

OptionDescriptionExample
--rebuild [--domain=domain]

The --rebuild option rebuilds all FPM configuration files and Apache vhost entries according to the values in the user's domain  php-fpm.yaml  files.

When you add the --domain=domain argument, the system restricts the --rebuild operation to only a single domain.

Note
titleNote:

The --domain=domain argument is optional.


/usr/local/cpanel/scripts/php_fpm_config --rebuild --domain=domain

--check [--json]

The --check option scans all configuration and .yaml files for any inconsistencies, then outputs an inventory of all known cPanel FPM configurations and statuses. It will also output any errors.  

It may also indicate that the .conf file in the php.fpm.d directory is older than than the .yaml file. If the system indicates this, run the script with the --rebuild option.

Note
titleNotes:
  • The output of this check defaults to human-readable format. The --json argument displays output in JSON format.
  • The --json argument is optional.


/usr/local/cpanel/scripts/php_fpm_config --check --json

--convert_all
The --convert_all option identifies all domains on a system and enables PHP-FPM on them. This script turns on PHP-FPM for all accounts.

If your domain's PHP is set to Inherit, the system converts it to the default PHP handler for the system. Then the system enables PHP-FPM for the specified account or accounts.

Warning
titleWarning:

Your server may run out of memory if you enable PHP-FPM on all domains and accounts. Make certain that your server possesses enough memory to continue, or you may experience severe data loss.


/usr/local/cpanel/scripts/php_fpm_config --convert_all


Note
titleNote:

Orphaned files represent configuration files in the php-fpm.d directory that cPanel does not manage. They may represent the source of any problems you encounter.

Additional documentation

Localtab Group


Localtab
activetrue
titleSuggested documentation

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("accounts","php-fpm") and label = "whm" and space = currentSpace()


Localtab
titleFor cPanel users

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("accounts","php-fpm") and label = "cpanel" and space = currentSpace()


Localtab
titleFor WHM users

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("accounts","php-fpm") and label = "whm" and space = currentSpace()


Localtab
titleFor developers

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("accounts","php-fpm") and space = "DD"