Return PHP version of all virtual hosts

This function returns the PHP version of every virtual host that a reseller controls.

Note:

This document only applies to systems that run EasyApache 4.

Important:

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

Authorizations:

Responses

Response Schema: application/json
object
object

Request samples

whmapi1 --output=jsonpretty \
  php_get_vhost_versions

Response samples

Content type
application/json
{
  • "data": {
    • "versions": [
      • {
        • "account": "rm3",
        • "account_owner": "root",
        • "documentroot": "/home/example/public_html",
        • "homedir": "/home/rm3",
        • "is_suspended": 0,
        • "main_domain": 1,
        • "php_fpm": 1,
        • "php_fpm_pool_parms": {
          • "pm_max_children": 5,
          • "pm_max_requests": 20,
          • "pm_process_idle_timeout": 10
          },
        • "phpversion_source": [
          • {
            • "domain": "example.com",
            • "system_default": 1
            }
          ],
        • "version": "ea-php72",
        • "vhost": "otherchars.rm3.tld"
        }
      ]
    },
  • "metadata": {
    • "command": "php_get_vhost_versions",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}