kernow

Well-Known Member
Jul 23, 2004
1,020
62
178
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?
 

kernow

Well-Known Member
Jul 23, 2004
1,020
62
178
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!
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello :)

I am happy to see you were able to find the solution. Thank you for updating us with the outcome.