Predefining Values for Customizable PHP Parameters
Plesk allows to define custom PHP configuration for a certain service plan, add-on plan, subscription, website, and even subdomain. For this purpose, the Plesk GUI exposes 16 most often used PHP parameters that allow customization. The administrator or a customer can set the value of each parameter either by selecting a value from a preset, typing a custom value, or leaving the default value. In the latter case, Plesk takes the parameter value from the server-wide PHP configuration.
Adding the following lines to the panel.ini file, you can specify what PHP parameters values will be available in the preset and toggle the visibility of the custom value field.
Defining the Preset Values
To set the list of predefined values for a certain PHP parameter:
[php]
settings.<parameter_group>.<parameter_name>.values[]=<value>
where
-
<parameter_group>
- a group of a PHP parameter:performance
for the performance PHP settings andgeneral
if the parameter is placed in to the common group. For more information about the groups of PHP parameters, read the Administrator’s Guide. -
<parameter_name>
- a name of a PHP parameter. Use the same syntax as inphp.ini
. -
<value>
- a parameter’s value added to the preset. Use the same syntax as inphp.ini
.
Add such line for each value in the preset. For example, if you want
Plesk users to choose the value of the memory_limit
parameter
between 8M
and 16M
, add the following lines to
panel.ini:
[php]
settings.performance.memory_limit.values[]=8M
settings.performance.memory_limit.values[]=16M
Hiding the Custom Value Fields
To hide the field that allows entering the custom value for a certain PHP parameter:
[php]
settings.<parameter_group>.<parameter_name>.custom=false
where
-
<parameter_group>
- a group of a PHP parameter:performance
for the performance PHP settings andgeneral
if the parameter is placed in to the common group. For more information about the groups of PHP parameters, read the Administrator’s Guide, -
<parameter_name>
- a name of a PHP parameter. Use the same syntax as inphp.ini
.
For example, if you do not want Plesk users to set custom values to the
memory_limit
parameter, add the following line to
panel.ini:
[php]
settings.performance.memory_limit.custom=false
To switch the custom value field back on, replace false
with
true
.