Page tree
Skip to end of metadata
Go to start of metadata

This documentation is for cPanel & WHM version 64 builds.  The "STABLE" version of our documentation can be found in the Documentation space.

(Home >> Software >> MultiPHP INI Editor)

Important:

cPanel's MultiPHP INI Editor interface only exists on systems that run EasyApache 4 and use the Paper Lantern theme.

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 for WHM interface (Home >> Software >> MultiPHP INI Editor).

MultiPHP INI Editor

Select a tab to view more information about that section of the MultiPHP INI Editor interface. 

 

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

The Basic Mode section of this interface loads the following 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 both the php.ini file and the user.ini file and your .htaccess file.

Notes:

  • We strongly recommend that you use the cPanel-provided default values for security purposes.
  • The availability of the following 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.
  • The interface's default values are the same as those on the php.net website. 

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, 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.

PHP directiveDescriptioncPanel defaultPHP default
allow_url_fopen Select whether PHP scripts can use URL-aware fopen wrappers.DisabledEnabled
allow_url_include Select whether PHP scripts can use URL-aware fopen wrappers with the following functions: include(), include_once(), require(), and require_once().DisabledDisabled
asp_tags

Select whether PHP scripts can use ASP-like tags in addition to PHP tags.

Note:

This includes variable-value printing shorthand (for example, <%= $value %>).

DisabledDisabled
display_errors Select whether PHP displays errors as output or hides them from the user.DisabledEnabled
enable_dl

Select whether scripts can call the dl function. This function dynamically loads a PHP extension at runtime. 

Warning:

If you set this directive to Enabled, it poses security risks to your server. We strongly recommend that you select Disabled unless you absolutely require the dl function.

DisabledEnabled
file_uploads Select whether your PHP scripts can upload HTTP files.EnabledEnabled

magic_quotes_gpc

Select whether PHP automatically escapes certain characters with a backslash (\).EnabledEnabled
max_execution_time Enter the maximum amount of time, in seconds, that your server allows a script to run before your server terminates it. This setting limits the amount of memory that poorly-written scripts may use.3030
max_input_time Enter the maximum amount of time, in seconds, that your server allows a script to parse input data.60 -1
max_input_vars Enter the maximum number of input variables per request. Use this directive to deter Denial of Service (DoS) attacks that use hash collisions on input variable names.10001000
memory_limit

Enter the maximum amount of memory that scripts can allocate, in bytes. This setting helps to prevent poorly-written scripts that may use too much memory. 

cPanel & WHM sets the default value based on the system's memory at the time of install.

Note:

Use the character M to define the limit in Megabytes.

cPanel & WHM adjusts this setting at the time of install, based on system memory:

  • 1 GB — 32M
  • 2-4GB — 64M
  • Over 4 GB — 128M
128M

register_globals

Select whether GET or POST input converts into variables that the script can use.DisabledDisabled

safe_mode

Select whether to enable safe mode. Safe mode increases security for PHP scripts and enables user, group, and environment checks and controls.

DisabledDisabled
session.save_path Enter the directory in which your server stores the files that PHP creates.NULLNULL
upload_max_filesize

Enter the maximum file size for an upload, in bytes.

Note:

Use the character M to define the limit in Megabytes.

2M2M

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

Warnings:

  • 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. Changes also save to your .htaccess file. For example, the location of your file may be /home/allthethings/public_html/php.ini. The interface attempts a rudimentary validation of directive names. This does not guarantee that your PHP will function. To reset your PHP settings to the default, delete the domain's or home directory's php.ini file.

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.

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, 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.

 

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