How to get or set php_directives using WHM API 1
How to get or set php_directives using WHM API 1
i tried but i get below response
{"metadata":{"result":0,"version":1,"reason":"Permission denied: You do not have the required privileges to run "php_ini_get_directives".","command":"php_ini_get_directives"}}
This is the issue of permission,
What permissions is required to get or set php_directives.
-
Hello, The following WHM API 1 function requires root access to the server: WHM API 1 Functions - php_ini_get_directives - Software Development Kit - cPanel Documentation Thus, you'd need to authenticate as the "root" user to run this command. Thank you. 0 -
I am using WHM account username and password while executing API but still get the permission issue, Look at the code below which i executes
Is that anything wrong i do in API call, Please guide me any better way if exist, I am using PHP as backend language.0 -
$whm_user = 'WHMUSER';
Can you confirm if this is the "root" username, or a reseller username? Thank you.0 -
Yes this is reseller user, see the attached image of control panel after successful login. 0 -
I understand it but why its not allowed to change php directives using reseller account, a reseller account has privileges for creating and manipulating account but not allowed to configure simple settings via API call, thats not fair. I can easily configure it manually by going to cpanel dashboard, my requirement is to change it from API call and untill it is not solved my site functionality in not complete. Please allow it also for reseller accounts. 0 -
Hello, It's not possible to update PHP versions and settings through Web Host Manager as a reseller. However, you are correct that this is possible for individual cPanel accounts. Here is the corresponding UAPI module available for use with individual cPanel accounts: UAPI Modules - LangPHP - Software Development Kit - cPanel Documentation I encourage you to open a feature request if you'd like to see an option to modify PHP version and configuration settings as a reseller: 0 -
Thanks for reply, i have submit a feature request. and i tried the UAPI Module and its not working, give the following error {"status":0,"data":null,"messages":null,"errors":["(XID ypckg2) "PHP" is not installed on the system.">,"metadata":{}} 0 -
and i tried the UAPI Module and its not working, give the following error {"status":0,"data":null,"messages":null,"errors":["(XID ypckg2) "PHP" is not installed on the system.">,"metadata":{}}
Could you let us know how we can reproduce the error message? Have you tried reproducing the issue using the UAPI function via the command line? Thank you.0
Please sign in to leave a comment.
Comments
9 comments