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!

opcache config problem

Discussion in 'Workarounds and Optimization' started by kernow, Sep 11, 2014.

  1. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    920
    Likes Received:
    13
    Trophy Points:
    168
    cPanel Access Level:
    Root Administrator
    We have opcache installed and running, and visiting domain.com/testopcache.php confirms it, but the configuration values shown on the test page are the default values for php opcache, not the values we have put in /usr/local/lib/php.ini file Example the test page says default opcache.memory_consumption is 64MB but we have it at 256MB in php.ini
    Any idea why this should be?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    920
    Likes Received:
    13
    Trophy Points:
    168
    cPanel Access Level:
    Root Administrator
    OK, I solved my own question. What's the answer?
    If your using CloudLinux php selector it doesn't matter what values you put in /usr/local/lib/php.ini for these modules as they will be ignored, you need to add/edit the php.ini file for each php version located in the directory
    /opt/alt/php**/etc/php.d.all ( where ** is the php version )
    Example, to edit the opcache values in php 5.5 from the default:
    Code:
    nano /opt/alt/php55/etc/php.d.all/opcache.ini
    Adjust to taste, save and then:
    Code:
    cagefsctl --rebuild-alt-php-ini
    Done!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #2 kernow, Sep 12, 2014
    Last edited: Sep 12, 2014
  3. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,749
    Likes Received:
    1,884
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

    I am happy to see you were able to find the solution. Thank you for updating us with the outcome.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    920
    Likes Received:
    13
    Trophy Points:
    168
    cPanel Access Level:
    Root Administrator
    EDIT
    No need to edit each php version php.ini as I said above, to make global changes edit:
    /etc/cl.selector/global_php.ini
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
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