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.

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

Response Schema: application/json
object
object

Request samples

whmapi1 php_get_handlers

Response samples

Content type
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
    }
}