Set PHP settings trough cPanel API
  1. Forums
  2. CloudLinux and Control Panels
  3. CloudLinux and cPanel
  1. Morten
  2. 21.12.2019
  3.  Subscribe via email

whmapi1 php_ini_set_directives directive-1=max_execution_time%3A360 version=alt-php74
This works fine.
But as long as we include a M/G like below it will not work:
whmapi1 php_ini_set_directives directive-1=memory_limit%3A756M version=alt-php74

But if we use it on a ea-php version it works just fine.
Could you fix it or talk to cPanel and make them fix this bug? :D

Or do you have easier way to change these PHP settings for all PHP versions?
Rate this post:
  1. 23.12.2019 16:12:07
  2. # 1
Sergey Khristich Accepted Answer
Posts: 504
Joined: 20.05.2019
Hello Morten,
Could you check again please? On our test server this bug is not played:

[[email protected] ~]# grep ^memory_limit /opt/alt/php74/etc/php.ini
memory_limit = 2G
[[email protected] ~]# whmapi1 php_ini_set_directives directive-1=memory_limit:128M version=alt-php74
data: {}
command: php_ini_set_directives
reason: OK
result: 1
version: 1
[[email protected] ~]# grep ^memory_limit /opt/alt/php74/etc/php.ini
memory_limit = 128M

You can try an alternative way to change this: the file edit directly /opt/alt/php74/etc/php.ini or use this guide here
If the problem persists, you can create a ticket here and our technical experts will help you.
Thank you.
Marketing Manager
  • Page :
  • 1

There are no replies made for this post yet.
Be one of the first to reply to this post!
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below. Supports gif,jpg,png,zip,rar,pdf
• Insert • Remove Upload Files (Maximum File Size: 2 MB)
To protect the site from bots and unauthorized scripts, we require that you enter the captcha codes below before posting your question.

EU e-Privacy Directive

This website uses cookies to ensure you get the best experience using our website and services. If you prefer we don’t use cookies, please disable them in your browser.

You have declined cookies. This decision can be reversed.

You have allowed cookies to be placed on your computer. This decision can be reversed.