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.

Using the /usr/local/psa/admin/conf/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, add the line of the following type to the [php] section of the panel.ini file:

settings.<parameter_group>.<parameter_name>.values[]=<value>

where

  • <parameter_group> - a group of a PHP parameter: performance for the performance PHP settings and general 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 in php.ini.
  • <value> - a parameter's value added to the preset. Use the same syntax as in php.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, add the line of the following type to the [php] section of the panel.ini file:

settings.<parameter_group>.<parameter_name>.custom=false

where

  • <parameter_group> - a group of a PHP parameter: performance for the performance PHP settings and general 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 in php.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.

 

Leave your comments on this page

Leave your feedback or question on this documentation topic below. For technical assistance, contact your hosting service provider or submit a request to Plesk support. Suggest new features for Plesk here. Discuss general questions on the Plesk forum. All offtopic comments will be removed.