Return PHP handlers

This function returns the PHP handlers on the system.

Important:

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

SecurityBasicAuth
Request
query Parameters
version
string

An installed PHP version.

  • ea-php54
  • ea-php55
  • ea-php56
  • ea-php70
  • ea-php71
  • ea-php72
  • inherit
  • Any custom PHP package name.

Important:

We deprecated PHP 5.6 and PHP 7.0 and will remove them in a future version. For more information, read our cPanel Deprecation Plan documentation.

Example: version=ea-php72
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
object
get/php_get_handlers
Request samples
whmapi1 --output=jsonpretty \
  php_get_handlers
Response samples
application/json
{
  • "data": {
    • "version_handlers": [
      • {
        • "available_handlers": [
          • "cgi",
          • "none",
          • "suphp"
          ],
        • "current_handler": "suphp",
        • "version": "ea-php72"
        }
      ]
    },
  • "metadata": {
    • "command": "php_get_handlers",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}