Description

This function allows WHM's MultiPHP Manager interface (Home >> Software >> MultiPHP Manager) to change the values of a domain.

Examples




https://hostname.example.com:2087/cpsess##########/json-api/php_set_vhost_versions?api.version=1&version=ea-php55&vhost-0=rm5.tld




https://hostname.example.com:2087/cpsess##########/xml-api/php_set_vhost_versions?api.version=1&version=ea-php55&vhost-0=rm5.tld




whmapi1 php_set_vhost_versions version=ea-php55 vhost-0=rm5.tld


whmapi1 php_set_vhost_versions vhost-0=rm5.tld php_fpm_pool_parms='{"pm_max_children":15,"pm_process_idle_timeout":100,"pm_max_requests":200}' php_fpm=1 version=ea-php56

 



{  
   "metadata":{  
      "reason":"OK",
      "result":1,
      "command":"php_set_vhost_versions",
      "version":1
   },
   "data":{  

   }
}




<result>
    <metadata>
        <reason>OK</reason>
        <result>1</result>
        <command>php_set_vhost_versions</command>
        <version>1</version>
    </metadata>
    <data/>
</result>



Parameters

ParameterTypeDescriptionPossible valuesExample
php_fpm_pool_parmsJSON

A JSON string that encodes a hash of values.

We introduced this parameter in cPanel & WHM version 60.


A valid JSON string that contains the pm_max_children, pm_process_idle_timeout, and pm_max_requests parameters.

 

pm_max_children

integer

The maximum number of child pages per pool.

This parameter defaults to 5.

You must supply this value in the php_fpm_pool_parms hash.


A valid child value.5

pm_process_idle_timeout

integer

A specified time of idleness before the system kills an FPM child page.

This parameter defaults to 10.

You must supply this value in the php_fpm_pool_parms hash.


A valid timeout value.

 

10

pm_max_requests

integer

The maximum number of requests per pool.

This parameter defaults to 20.

You must supply this value in the php_fpm_pool_parms hash.


A valid request value.20
php_fpmBoolean

Whether PHP-FPM is enabled.

This parameter defaults to 0.

  • 1 — PHP-FPM enabled.
  • 0 — PHP-FPM not enabled.
1

version

string

Required

The virtual host's PHP version.

ea-php70

vhost-0

string

Required

The virtual host's name.

A valid hostname.otherchars.rm3.tld

Returns

This function only returns metadata.