Description

This function returns the PHP handlers on the system.

Examples




https://hostname.example.com:2087/cpsess##########/json-api/php_get_handlers?api.version=1&version=ea-php55




https://hostname.example.com:2087/cpsess##########/xml-api/php_get_handlers?api.version=1&version=ea-php55




whmapi1 php_get_handlers version=ea-php55



{
   "data":{
      "version_handlers":[
         {
            "version":"ea-php70",
            "available_handlers":[
               "cgi",
               "none",
               "suphp"
            ],
            "current_handler":"suphp"
         }
      ]
   },
   "metadata":{
      "version":1,
      "reason":"OK",
      "result":"1",
      "command":"php_get_handlers"
   }
}




<result>
    <data>
        <version_handlers>
            <version>ea-php70</version>
            <available_handlers>cgi</available_handlers>
            <available_handlers>none</available_handlers>
            <available_handlers>suphp</available_handlers>
            <current_handler>suphp</current_handler>
        </version_handlers>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>php_get_handlers</command>
    </metadata>
</result>



Parameters

ParameterTypeDescriptionPossible valuesExample

version

stringAn installed PHP version.
ea-php70

Returns

ReturnTypeDescriptionPossible valuesExample

version_handlers

array of hashesAn array of hashes of the available PHP handlers.

This array of hashes includes the version, current_handler, and available_handlers returns.

 

version

string

An installed PHP version.

The function returns this value in the version_handlers hash.

ea-php70

current_handler

string

The PHP version's handler.

The function returns this value in the version_handlers hash.

  • suphp
  • cgi
  • dso
  • none
cgi

available_handlers

array

The installed PHP handlers.

The function returns this value in the version_handlers hash.

  • suphp
  • cgi
  • dso
  • none
cgi