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.

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:
    867
    Likes Received:
    9
    Trophy Points:
    18
    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?
     
  2. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    867
    Likes Received:
    9
    Trophy Points:
    18
    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!
     
    #2 kernow, Sep 12, 2014
    Last edited: Sep 12, 2014
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  4. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    867
    Likes Received:
    9
    Trophy Points:
    18
    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
     
Loading...

Share This Page