v1

latestOpenAPI 3.0.2cPanel License2026-08-06657427.1 MB
LangPHP
PHP Settings

Update basic PHP directives

This function sets the values of any basic PHP directive. The Basic Mode section of cPanel's MultiPHP INI Editor interface (WHM >> Home >> Software >> MultiPHP INI Editor) lists these directives.

Note:

This document only applies to systems that run EasyApache 4 with MultiPHP enabled.

Important:

When you disable the Web Server role, the system disables this function.

get/LangPHP/php_ini_set_user_basic_directives

Query parameters

directivestring required

The name of a PHP directive and its value.

Note:

  • To change the directive's value for multiple PHP directives, increment the parameter name. For example, the directive-1directive-2, and directive-3 parameters.
  • You must format values as <directive>:<value>
type'home' | 'vhost' required
Example:vhost

The type of php.ini file.

  • home
  • vhost

Important:

If you set this parameter to vhost, you must also include the vhost parameter.

vhoststring domain
Example:clearly.com

The name of a virtual host.

Important:

If the type value is vhost, you must use this parameter.

Response

HTTP Request was successful.

apiversioninteger

The version of the API.

funcstring

The name of the method called.

modulestring

The name of the module called.

Example response

{
  "apiversion": 3,
  "func": "php_ini_set_user_basic_directives",
  "module": "LangPHP",
  "result": {
    "metadata": {
      "LangPHP": {
        "path": "/home/allthethings/public_html/php.ini",
        "phpversion": "ea-php55",
        "type": "vhost",
        "vhost": "clearly.com"
      }
    },
    "status": 1
  }
}