Update PHP version's handler

This function sets a PHP version's handler.

Important:

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

SecurityBasicAuth
Request
query Parameters
handler
required
string

An installed PHP handler.

  • cgi
  • suphp
  • dso
  • none
Enum: "cgi" "suphp" "dso" "none"
Example: handler=suphp
version
required
string

An installed PHP version.

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

HTTP Request was successful.

Response Schema: application/json
object
get/php_set_handler
Request samples
whmapi1 --output=jsonpretty \
  php_set_handler \
  version='ea-php70' \
  handler='suphp'
Response samples
application/json
{
  • "metadata": {
    • "command": "php_set_handler",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}