latestOpenAPI 3.0.2cPanel License2026-08-106251554.3 MB

3da41671c02c

PHP

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.

get/php_set_vhost_versions

Query parameters

version'ea-php54' | 'ea-php55' | 'ea-php56' | 'ea-php70' | 'ea-php71' | 'ea-php72' | 'inherit' required
Example:ea-php70

The virtual host's (vhost) PHP version.

Note:

This parameter also accepts any custom PHP package names.

vhoststring required

The virtual host's name.

Note:

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

php_fpm1 | 0
Example:1

Whether PHP-FPM is enabled.

  • 1 — Enabled.
  • 0 — Disabled.

A JSON-encoded string containing a hash of values.

Response

HTTP Request was successful.

Example response

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