Knowledgebase: WHM > Software > MultiPHP INI Editor
MultiPHP INI Editor for WHM
Posted by Matthew Jeffels, Last modified by Matthew Jeffels on 11 December 2016 06:11 PM

MultiPHP INI Editor for WHM

This interface allows you to configur your PHP settings that allows you to generate web pages.

You can choose from the tabs at the top of the screen where you can select from using the basic interface or the editor interface.

Basic Mode

In basic mode you will first need to select the PHP version that you wish to configure from the menu.

This will cause the PHP directives to appear. The Basic Mode loads the directive values from the local.ini file for your selected version of PHP, if it exists. Otherwise, it will load the directive values from the php.ini file of your selected version of PHP.

You will then need to 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 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.

PHP Directives

allow_url_fopen - Select whether PHP scripts can use URL-aware fopen wrappers. By default this is 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(). By default this is 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 %>). By default this is disabled.

display_errors - Select whether PHP displays errors as output or hides them from the user. By default this is 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. By default this is disabled

file_uploads - Select whether your PHP scripts can upload HTTP files. By default this is enabled. 

magic_quotes_gpc - Select whether PHP automatically escapes certain characters with a backslash (\). By default this is 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. By default this is set to 30.

max_input_time - Enter the maximum amount of time, in seconds, that your server allows a script to parse input data. By default this is set to -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. By default this is set to 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. You should use the character "M" to define the limit in Megabytes. By default this is set to 128M. 

register_globals - Select whether GET or POST inout converts into variables that the script can use. By default this is 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. By default this is disabled. 

session.save_path - Enter the directory in which your server stores the files that PHP creates. By default this is set to NULL.

upload_max_filesize - Enter the maximum file size for an upload, in bytes. You should use the character "M" to define the limit in Megabytes. By default this is set to 2M.

Editor Mode

Please be aware you must exercise extreme caution when you make changes in this section; errors that you make here could result in non-functional PHP scripts. It is recommended that only advanced users should use this interface.

PHP reserve the following words and as a result you cannot use them as directives: null, yes, no, true, false, on, off, and none. Directives may also not contain any the following special characters: ?{}|&~![()^"

The following values set the directive value to "": null, off, no, and false. Where as the following values set the directive value to 1: on, yes, and true.

First select the PHP version that you wish to configure from the menu. This will cause the PHP directives to appear.

The Editor Mode tab of this interface loads the contents of the local.ini file for your selected version of PHP, if it exists. Otherwise, it will load the php.ini file for your selected version of PHP.

You will then need to 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 will attempt a rudimentary validation of directive names to ensure that they are properly formatted. This does not however guarantee that your PHP will function.

If you wish to reset your PHP settings to the default, delete the PHP version's local.ini file.

Thanks

Matt Jeffels
PAC Web Hosting

(0 vote(s))
Helpful
Not helpful

Comments (0)