WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
Request
The version of PHP that you wish to set as the system's default.
ea-php81inherit- Any custom PHP package name.
Important:
When you disable the Web Server role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/php_set_system_default_version
- A server running WHM.
https://whm-server.tld:2087/json-api/php_set_system_default_version
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/php_set_system_default_version?version=ea-php81'{ "metadata": { "command": "php_set_system_default_version", "reason": "Ok", "result": 1, "version": 1 } }
Request
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.
The virtual host's (vhost) PHP version.
Note:
This parameter also accepts any custom PHP package names.
The virtual host's name.
Note:
To set multiple vhosts, increment the parameter name. For example, vhost-1, vhost-2, and vhost-3.
Whether PHP-FPM is enabled.
1— Enabled.0— Disabled.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/php_set_vhost_versions
- A server running WHM.
https://whm-server.tld:2087/json-api/php_set_vhost_versions
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/php_set_vhost_versions?version=ea-php70&vhost=string&php_fpm=1&php_fpm_pool_parms={%22pm_max_children%22%3A5%2C%22pm_max_requests%22%3A20%2C%22pm_process_idle_timeout%22%3A10}'{ "metadata": { "command": "php_set_vhost_versions", "reason": "OK", "result": 1, "version": 1 } }