Update domain's PHP values

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

Important:

When you disable the Web Server role, the system disables this function.

Warning:

We strongly recommend that you only activate Apache PHP-FPM if your server has at least 2 GB of RAM available, or at least 30 MB of RAM per domain. If you enable PHP-FPM on a server with less than the required RAM, your server may experience severe performance issues.

SecurityBasicAuth
Request
query Parameters
version
required
string

The virtual host's (vhost) PHP version.

Note:

This parameter also accepts any custom PHP package names.

Enum: "ea-php54" "ea-php55" "ea-php56" "ea-php70" "ea-php71" "ea-php72" "inherit"
Example: version=ea-php70
vhost
required
string

The virtual host's name.

Note:

To set multiple vhosts, increment the parameter name. For example, vhost-1, vhost-2, and vhost-3.

Examples:
vhost=vhost-1=otherchars.rm3.tld vhost-2=morechars.rm3.tld vhost-3=lotschars.rm3.tld
vhost=otherchars.rm3.tld
php_fpm
integer
Default: 0

Whether PHP-FPM is enabled.

  • 1 — Enabled.
  • 0 — Disabled.
Enum: 1 0
Example: php_fpm=1
object <json>

A JSON-encoded string containing a hash of values.

Example: php_fpm_pool_parms={"pm_max_children":5,"pm_max_requests":20,"pm_process_idle_timeout":10}
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
get/php_set_vhost_versions
Request samples
whmapi1 --output=jsonpretty \
  php_set_vhost_versions \
  version='ea-php70' \
  vhost='otherchars.rm3.tld'
Response samples
application/json
{
  • "metadata": {
    • "command": "php_set_vhost_versions",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}