SOLVED PHP-FPM Multi-php ini Configuration change not being applied?

SupraMario

Active Member
Mar 28, 2006
27
3
153
hi everyone,

Recently we converted to php-fpm and I was happy with it, the majority of sites are still on php-56 though, and hence I modified the

/opt/cpanel/ea-php56/root/etc/php.ini

Code:
opcache.enable=1
opcache.enable_cli=1
opcache.memory_consumption=2512
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=40000
opcache.revalidate_freq=60
opcache.fast_shutdown=1
to include the following opcache improvements.

Server is 16 core / 16gb ram.

Today I decided to make similar change in the php70 for the sites that are using that.
So I went to edit the /opt/cpanel/ea-php70/root/etc/php.ini applied the same configuration.

Did the normal php-fpm restart via the WHM and when I view the opcache settings, they're still exactly the same as default, ie 128mb ram.

I can modify the ea-php56 as frequently as I like and when I restart php-fpm the changes are applied, but php-70 nothing happens.

Cpanel Version : v72.0.10
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
Hello @SupraMario,

The OPCache extension uses it's own .ini file at:

/opt/cpanel/ea-php70/root/etc/php.d/10-opcache.ini

This is the file you should edit if you want to modify the default global OPcache PHP settings for PHP 7.0. Upon making the changes, ensure to run the following commands:

Code:
/scripts/restartsrv_apache_php_fpm
/scripts/restartsrv_httpd
The following resource is also available if you'd like to read more about managing php.ini directives with PHP-FPM on a per-account basis or exclusively for domains using PHP-FPM:

Tutorial - Managing php.ini directives with PHP-FPM

Thank you.
 

SupraMario

Active Member
Mar 28, 2006
27
3
153
Hi CpanelMichael,

Absolutely perfect, thank you very much for your response that worked perfectly.