In cPanel & WHM version 58, we created a PHP patch that forces an EasyApache 4 system to read its
php.ini files in the same order as an EasyApache 3 system.
Your system's PHP handler determines how your system behaves with this patch and which global values the system uses.
If you use the CGI or DSO PHP handler, the system uses the global values that the
/opt/cpanel/ea-php##/root/etc/php.ini or the
/opt/cpanel/ea-php##/root/etc/php.d/*.ini files define.
If your system uses the suPHP PHP handler, the system loads PHP INI directives in a specific order.
Your PHP handler determines your system's behavior.
As of cPanel & WHM version 64, the system no longer uses
local.ini files. If a
local.ini file exists on your system, run the following command to migrate your file to the system's primary
CGI or DSO
The system only uses the values that the
file or the
.ini files in the
- We strongly recommend that you allow your system to load the
.inifiles and directives as it finds them. This guarantees the most predictable results.
- We strongly recommend that you do not specify a location for your
.inifile with the
[phprc_paths]section of the
suPHP_ConfigPathdirective, or set the PHPRC environmental variable. Unexpected behavior may occur.
.user.inifile that exists in the same directory as the PHP script.
- Do not set the
- If the system does not find a
.user.inifile, it searches up the directory tree until finds one and uses that file as if it existed in the PHP file's directory.
- In PHP 5, the system does not search below the domain's document root.
- In PHP 7, the system will search below the domain's document root.
- The system ignores directives that are not allowed in
- Do not set the
php.inifile that exists in the same directory as the PHP script.
.inifiles in the PHP version's
PHP scans the files in alphabetical order. To see the files that PHP loaded, you can run the
php_ini_scanned_files()command or run PHP with the
- The PHP version's global
- The PHP default setting.
If you specified a location for your
.ini file, the system does not load configurations in the
/etc/php.d/ directory. Instead, it loads the settings in the
php.ini file that the directive specifies. We strongly recommend that you do not specify the location of a
The presence of one of the following sets the location of
.ini file that the system reads:
phprc_paths]section of the
- If you set a file location with the PHPRC environmental variable
- We strongly recommend that you do not set the
suPHP_ConfigPathdirective or set the PHPRC environmental variable. Unexpected behavior may occur.
If you specify the location of an
.inifile, you must provide a complete
.inifile. Run the following command to ensure that your users receive a complete
There is no content with the specified labels