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!

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:
    17
    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:
    44,378
    Likes Received:
    1,857
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Dev@SH

    Dev@SH Member

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

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice