UAPI accesses the cPanel interface's features. Use this API to access and modify cPanel account data and settings.
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/
https://{host}:{port}/execute/
Request
This function changes the contents of a virtual host's php.ini file.
Note:
This document only applies to systems that run EasyApache 4 with MultiPHP enabled.
Important:
When you disable the WebServer role, the system disables this function.
The content of the php.ini file to change.
The type of php.ini file.
homevhost
Important:
If you set this parameter to vhost, you must also include the vhost parameter.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/LangPHP/php_ini_set_user_content
- A server running cPanel.
https://cpanel-server.tld:2083/execute/LangPHP/php_ini_set_user_content
- 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/cpanel.openapi/LangPHP/php_ini_set_user_content?content=%255BPHP%255D%250D%250A%253B%2BAbout%2Bphp.ini%250D%250A%253B%2Bphp.ini%2Bis%2Bresponsible%2Bfor%2Bconfiguring%2Bmany%2Bof%2Bthe%2Baspects%2Bof%2BPHP%2527s%2Bbehavior.%250D%250Apcre.backtrack_limit%253D100000&type=vhost&vhost=clearly.com'{ "apiversion": 3, "func": "php_ini_set_user_content", "module": "LangPHP", "result": { "data": {}, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function sets a virtual host's PHP version.
Note:
This document only applies to systems that run EasyApache 4.
Important:
When you disable the WebServer role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/LangPHP/php_set_vhost_versions
- A server running cPanel.
https://cpanel-server.tld:2083/execute/LangPHP/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/cpanel.openapi/LangPHP/php_set_vhost_versions?version=ea-php72&vhost=string'{ "apiversion": 3, "func": "php_set_vhost_versions", "module": "LangPHP", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }