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.

Authorizations:
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

Response Schema: application/json
object

Request samples

whmapi1 php_set_handler version='ea-php70' handler='suphp'

Response samples

Content type
application/json
{
  • "metadata": {
    • "command": "php_set_handler",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}