Announcement

Collapse
No announcement yet.

Set PHP settings trough cPanel API

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Set PHP settings trough cPanel API

    Hello, 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? Or do you have easier way to change these PHP settings for all PHP versions?

  • #2
    Hello Morten,
    Could you check again please? On our test server this bug is not played:

    Code:
    [root@cl7cpea4test ~]# grep ^memory_limit /opt/alt/php74/etc/php.ini
    
    memory_limit = 2G
    
    [root@cl7cpea4test ~]# whmapi1 php_ini_set_directives directive-1=memory_limit:128M version=alt-php74
    
    ---
    
    data: {}
    
    metadata:
    
    command: php_ini_set_directives
    
    reason: OK
    
    result: 1
    
    version: 1
    
    [root@cl7cpea4test ~]# 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 http://[https://docs.cloudlinux.com/...t-php-versions
    If the problem persists, you can create a ticket here https://cloudlinux.zendesk.com/hc/en-us/requests/new and our technical experts will help you.
    Thank you.](https://docs.cloudlinux.com/cloudlinux_os_components/#configuring-global%E2%80%9D-php-ini-options-for-all-alt-php-versions)

    Comment

    Working...
    X