Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Skip WHM Setup PHP memory_limit check?

Discussion in 'Workarounds and Optimization' started by Dev@SH, Feb 12, 2018.

  1. Dev@SH

    Dev@SH Member

    Joined:
    Mar 11, 2014
    Messages:
    16
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    DataCenter Provider
    Question:

    When creating a new server / installing cPanel, is there a way to skip cPanel from doing it's checking on PHP's memory_limit?

    We are setting the values via a push of the configs from Saltstack and we have run that package again because that check overnight our changes already places on the server.

    Or is there a way to pass a variable to a file to skip this step?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    41,502
    Likes Received:
    1,616
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    This only runs at install time, so you could use the following WHM API 1 function post installation to configure the memory_limit to your own preferred value:

    WHM API 1 Functions - php_ini_set_directives - Software Development Kit - cPanel Documentation

    Here's an example of the commands you could use (for each PHP version that's installed):

    Code:
    whmapi1 php_ini_set_directives directive-1=memory_limit%3A128M version=ea-php56
    whmapi1 php_ini_set_directives directive-1=memory_limit%3A128M version=ea-php70
    whmapi1 php_ini_set_directives directive-1=memory_limit%3A128M version=ea-php71
    
    Thank you.
     
  3. Dev@SH

    Dev@SH Member

    Joined:
    Mar 11, 2014
    Messages:
    16
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    DataCenter Provider
    Thanks for the info.
     
    cPanelMichael likes this.
Loading...

Share This Page