Update PHP version's directives

This function sets the value of a PHP version's directives.

Note:

This document only applies to systems that run EasyApache 4.

Important:

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

SecurityBasicAuth
Request
query Parameters
directive
required
string

The name of a PHP directive and its value.

Note:

To change the directive's value for multiple PHP directives, duplicate or increment the parameter name. For example, to change three directives, use the directive parameter multiple times or use the directive-1, directive-2 , and directive-3 parameters.

Examples:
directive=directive-1=allow_url_fopen:0&directive-2=max_input_vars=1000
directive=allow_url_fopen:0
version
required
string

PHP version on the system.

Note

  • ea-php56
  • ea-php70
  • ea-php71
  • ea-php72
  • Any custom PHP package name.
Example: version=ea-php72
Responses
200

HTTP Request was successful.

Response Schema: application/json
data
object
object
get/php_ini_set_directives
Request samples
whmapi1 --output=jsonpretty \
  php_ini_set_directives \
  directive='allow_url_fopen:0' \
  version='ea-php72'
Response samples
application/json
{
  • "data": { },
  • "metadata": {
    • "command": "php_ini_set_directives",
    • "reason": "Ok",
    • "result": 1,
    • "version": 1
    }
}