WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
Request
This function determines whether your system runs with a preconfigured PHP-FPM configuration.
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_get_old_fpm_flag
- A server running WHM.
https://whm-server.tld:2087/json-api/php_get_old_fpm_flag
- 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_get_old_fpm_flag{ "data": { "old_fpm_flag": 2 }, "metadata": { "command": "php_get_old_fpm_flag", "reason": "OK", "result": 1, "version": 1 } }
Request
This function determines whether to enable PHP-FPM on new accounts and domains on a server.
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.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/php_set_default_accounts_to_fpm
- A server running WHM.
https://whm-server.tld:2087/json-api/php_set_default_accounts_to_fpm
- 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_default_accounts_to_fpm?default_accounts_to_fpm=1'{ "data": null, "metadata": { "command": "php_set_default_accounts_to_fpm", "reason": "OK", "result": 1, "version": 1 } }
Request
This function creates the /etc/cpanel/ea4/old_fpm_flag touch file.
Note:
If this touch file exists, the system will not display a message that indicates whether your system runs on an outdated PHP-FPM configuration. If you wish to see the message again, delete this touch file.
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_old_fpm_flag
- A server running WHM.
https://whm-server.tld:2087/json-api/php_set_old_fpm_flag
- 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_old_fpm_flag{ "data": { "success": 0 }, "metadata": { "command": "php_set_old_fpm_flag", "reason": "OK", "result": 1, "version": 1 } }