PHP Settings

Custom PHP settings that are applied to all plan subscriptions are defined by the php-settings node. This node is specified by complex type phpSettings (domain_template.xsd). This type is structured as follows:

webspace_phpSettings

  • The setting node is required. It specifies a certain PHP setting and its value.
    • The name node is required. It specifies a name of a certain PHP setting. Data type: string. You should use the same setting name that is used in the php.ini configuration file. For example, memory_limit, safe_mode, and so on.
    • The value node is required. It specifies a value of a certain PHP setting. Data type: string. You should use the same setting values that are used in the php.ini configuration file. For example, for memory_limit it can be 128M or on for the safe_mode parameter. If you want to set the default value to a PHP parameter, send the request with the blank value node.

 

The following sample packet creates a service plan and sets the memory_limit and safe_mode settings:

<packet>
<service-plan>
<add>
   <name>base_plan</name>
   <php-settings>
      <setting>
         <name>memory_limit</name>
         <value>128M</value>
      </setting>
      <setting>
         <name>safe_mode</name>
         <value>on</value>
      </setting>
   </php-settings>
</add>
</service-plan>
</packet>

 

Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.

 

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.