Description

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

Examples 




https://hostname.example.com:2083/cpsess##########/execute/LangPHP/php_get_impacted_domains?system_default=1&domain=example.com



$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Get the affected domains.
$get_impacted_domains = $cpanel->uapi(
    'LangPHP', 'php_get_impacted_domains',
    array(
        'system_default'     => '1', 
		'domain'			 => 'example.com',
         )
);

 



my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Get the affected domains.
my $get_impacted_domains = $cpliveapi->uapi(
    'LangPHP', 'php_get_impacted_domains',
    (
        'system_default'     => '1',
		'domain'			 => 'example.com', 
        )
);



<!-- Get the affected domains. -->
[% execute( 'LangPHP', 'php_get_impacted_domains',{ 'system_default' => '1', 'domain' = 'example.com' } ); %]



uapi --user=username LangPHP php_get_impacted_domains system_default=1 domain=example.com



{
   "data":{
      "domains":[
         "example.com",
         "subdomain.example.com",
         "example2.com"
      ]
   },
   "status":1,
   "messages":null,
   "errors":null,
   "metadata":{

   }
}



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

Return
Type
Description
Possible values
Example

domains

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

Any valid domain or subdomain.

This function does not return parked domains.


example.com