Description

This function lists domains that obtain their PHP version from a specified PHP configuration.

Examples 




https://hostname.example.com:2087/cpsess##########/json-api/php_get_impacted_domains?api.version=1&system_default=1&domain=example.com




https://hostname.example.com:2087/cpsess##########/json-api/php_get_impacted_domains?api.version=1&system_default=1&domain=example.com




whmapi1 php_get_impacted_domains system_default=1 domain=example.com



{
   "metadata":{
      "command":"php_get_impacted_domains",
      "version":1,
      "result":1,
      "reason":"OK"
   },
   "data":{
      "domains":[
         "example.com",
         "subdomain.example.com",
         "example2.com"
      ]
   }
}




<result>
    <metadata>
        <result>1</result>
        <command>php_get_impacted_domains</command>
        <reason>OK</reason>
        <version>1</version>
    </metadata>
    <data>
        <domains>example.com</domains>
        <domains>subdomain.example.com</domains>
        <domains>example2.com</domains>
    </data>
</result>



Parameters

ParameterTypeDescriptionPossible valuesExample
system_defaultBoolean

Whether to return domains that inherit the system's default PHP version.

  • We introduced this parameter in cPanel & WHM version 64.
  • You must pass either the system_default or domain parameters, or both.  


1 — Return domains that inherit the system's default PHP version.

0 — Do not return domains that inherit the system's default PHP version.

If you pass this parameter with a false value and do not also pass the domain parameter, the function returns an error.  


1
domainstring

A domain on the system.

  • We introduced this parameter in cPanel & WHM version 64.
  • You must pass either the system_default or domain parameters, or both.  
  • You can pass this parameter multiple times.


Any valid domain name on the system.

You cannot pass the name of a parked domain.


example.com

location

string

The location of a PHP configuration.

We removed this parameter in cPanel & WHM version 64.


    • system:default
    • domain:example.com
domain:example.com

Returns

ReturnTypeDescriptionPossible valuesExample

domains

array

The domains that obtain their PHP version from the PHP configuration.

Any valid domain or subdomain.

This function does not return parked domains.


example.com