MultiPHP INI Editor for cPanel v82

Valid for versions 82 through the latest version

Version:

82


Overview

This interface allows you to configure your PHP settings.

Note:

WHM users can view information about the server's PHP INI settings in WHM’s MultiPHP INI Editor interface (WHM >> Home >> Software >> MultiPHP INI Editor).

MultiPHP INI Editor

Select the location that you wish to configure from the menu. You can edit either the account’s home directory or the domain’s document root. The PHP directives will appear.

Basic Mode

The Basic Mode section of this interface loads directive values from the php.ini file for your selected domain or home directory. Make your changes to the desired directives and click Apply. The system saves changes to the php.ini file, the user.ini file, and your .htaccess file.

Important:

If you use the DSO PHP handler and you change your PHP version to a different major PHP version, the system will not read your configuration changes.

For example, if you change your PHP version from PHP 5 to PHP 7. To correct this issue, you must edit and save your PHP configuration again in the interface. The system will then load the .htaccess directives correctly.

Note:
  • For security purposes, we strongly recommend that you use the cPanel-provided default values.
  • The availability of directives depends on your version of PHP. If a directive does not appear in your interface, your version of PHP does not support it.
  • The system only writes a directive to an .ini or .htaccess file if that file supports the directive. Your php.ini, .user.ini, and .htaccess files may not be identical. For more information about which files support which directives, read PHP’s documentation.
  • To ensure compatibility with the LSAPI module, the system also adds an LSAPI section to your .htaccess file. This section might resemble the following example:
    1
    2
    3
    4
    5
    
    <IfModule lsapi_module>
      php_value date.timezone "America/Chicago"
      php_value memory_limit 128M
      php_value upload_max_filesize 60M
    </IfModule>

Editor Mode

Select the location that you wish to configure from the menu. You can edit either the user account’s home directory or the domain’s document root. The PHP directives will appear.

Warning:
  • You must exercise extreme caution when you make changes in this interface. Errors could result in non-functional PHP scripts. Only advanced users should use this interface.
  • We restrict the following words and you cannot use them as directives: null, yes, no, true, false, on, off, and none. Directives also cannot contain any the following special characters: ?{}|&~![()^"
  • The following values set the directive value to "": null, off, no, and false.
  • The following values set the directive value to 1: on, yes, and true.

The Editor Mode section of this interface loads the contents of the php.ini file for your selected domain, if it exists. If the php.ini file does not exist, the interface loads a blank editor so that you can create your own file. Make your changes to the desired directives and click Save.

The system saves changes to both the php.ini file in the Path section of the interface and the .user.ini file. The system also saves these changes to your .htaccess file.

To ensure compatibility with the LSAPI module, the system also adds an LSAPI section to your .htaccess file. This section might resemble the following example:

1
2
3
4
5
<IfModule lsapi_module>
      php_value date.timezone "America/Chicago"
      php_value memory_limit 128M
      php_value upload_max_filesize 60M
</IfModule>

For example, the location of your file may be the /home/allthethings/public_html/php.ini file. The interface attempts a rudimentary validation of directive names. This does not guarantee that your PHP configuration will function. To reset your PHP settings to default values, delete the domain’s or home directory’s php.ini file.

Important:

If you use the DSO PHP handler, the system will not read your configuration changes if you change your PHP version to a different major PHP version. For example, you change your PHP version from PHP 5 to PHP 7.

To correct this issue, you must edit and save your PHP configuration again in the interface. The system will then load the .htaccess directives correctly.

Note:

The system only writes a directive to an .ini or .htaccess file if that file supports the directive. Your php.ini, .user.ini, and .htaccess files may not be identical. For more information about which files support which directives, read the PHP documentation.

For more information about a directive, search the php.net documentation.

Additional Documentation