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:

WHM's MultiPHP INI Editor interface only exists on systems that run EasyApache 4.  

Overview

This interface allows you to configure your PHP settings. The PHP scripting language generates web pages.

Note:

cPanel users can view information about the server's PHP configuration in cPanel’s MultiPHP INI Editor 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 PHP version that you wish to configure from the menu. The PHP directives will appear.

The Basic Mode section of this interface loads the directive values from the local.ini file for your selected version of PHP, if it exists. Otherwise, this interface loads the directive values from the php.ini file of your selected version of PHP. Make your changes to the desired directives and click Save.

Changes save to the /opt/cpanel/<your_php_package>/root/etc/php.d/local.ini file, where <your_php_package> represents the name of the PHP package that contains the .ini file that you wish to edit.

Notes:

  • 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 listed default values mirror those on the php.net website.
PHP directiveDescriptionPHP default
allow_url_fopen Select whether PHP scripts can use URL-aware fopen wrappers.Enabled
allow_url_include Select whether PHP scripts can use URL-aware fopen wrappers with the following functions: include(), include_once(), require(), and require_once().Disabled
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 %>).

Disabled
display_errors Select whether PHP displays errors as output or hides them from the user.Disabled
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.

Disabled
file_uploads Select whether your PHP scripts can upload HTTP files.Enabled

magic_quotes_gpc

Select whether PHP automatically escapes certain characters with a backslash (\).Enabled
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.30
max_input_time Enter the maximum amount of time, in seconds, that your server allows a script to parse input data.-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.1000
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

register_globals

Select whether GET or POST inout converts into variables that the script can use.Disabled

safe_mode

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

Disabled

Enter the directory in which your server stores the files that PHP creates.

Introduced in cPanel & WHM version 64

PHP sessions are now saved by default in the /var/cpanel/php/sessions directory. EasyApache4 installations create subdirectories based on the version of PHP currently installed. If multiple versions of PHP exist on the system, there will be a subdirectory for each version of PHP. This directory is owned by the root user and has 4733 permissions. This allows PHP to write session files, but users are unable to see other sessions in the directory. The consequence of PHP-written session files is that PHP is unable to clean its own sessions. The session files are cleaned by a root-run cron job.

Note:

If you change the session.save_path in the php.ini configuration file, the cron job will continue to clean up the sessions files in specified directory. When the cron job is run it will ensure that the directory permissions are correct.

Important:

Do not change the session.save_path to /tmp or a directory that other users or programs use. If you change the session.save_path to another directory, the directory's permissions will be changed to 4733. This will likely break other programs' functionality. If /tmp must be used, create a subdirectory under /tmp to hold the PHP session files.


NULL
 session.max_lifetime

Enter the maximum amount of time, in seconds, for the lifetime of a session file.

Once the session is older than the session.max_lifetime, it is seen as garbage and deleted the next time session cleanup is performed. This setting is respected for each version of PHP installed. By default, it is 1440 seconds (24 minutes).

Note:

Session files can exist on the filesystem longer than the session.max_lifetime setting. Since session cleanup happens every 30 minutes, a session file could exist for up to its session.max_lifetime plus 30 minutes.

 1440
 session.gc_probabilityAs of cPanel & WHM version 64, this is set to 0 by default.Since a cron job cleans up the session files, this directive is not needed. If you enable this setting, PHP will attempt to clean up its own session files, which will fail and cause a waste of system resources. 0
 session.gc_divisor As of cPanel & WHM version 64, this is set to 0 by default.Since a cron job cleans up the session files, this directive is not needed. If you enable this setting, PHP will attempt to clean up its own session files, which will fail and cause a waste of system resources. 0
upload_max_filesize

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

Note:

Use the character M to define the limit in Megabytes.

2M

Select the PHP version that you wish to configure from the menu. 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 reserve 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 local.ini file for your selected version of PHP, if it exists. Otherwise, this interface loads the php.ini file for your selected version of PHP. Make your changes to the desired directives and click Save.

Changes save to the /opt/cpanel/<your_php_package>/root/etc/php.d/local.ini file, where < your_php_package > represents the name of the PHP package that contains the .ini file that you wish to edit. The interface attempts a rudimentary validation of directive names to ensure that they are properly formatted. This does not guarantee that your PHP will function. To reset your PHP settings to the default, delete the PHP version's local.ini file.

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

Additional documentation