0

I have recently updated my Centos 6, Apache server to php 5.6 from 5.4 and I'm attempting to configure opcache.

I have updated my opcache settings in /etc/php.ini to:

[opcache]
opcache.revalidate_freq = 0
opcache.validate_timestamps = 0
opcache.max_accelerated_files = 12000
opcache.memory_consumption = 256
opcache.interned_strings_buffer = 16
opcache.fast_shutdown = 1

And run service httpd restart.

The function opcache_get_configuration() tells me that it has changed the following:

 [opcache.validate_timestamps] =>
 [opcache.revalidate_freq] => 0
 [opcache.fast_shutdown] => 1

But the following remain unchanged:

 [opcache.memory_consumption] => 134217728 // or 128 mebibytes
 [opcache.interned_strings_buffer] => 8
 [opcache.max_accelerated_files] => 4000

How do I get opcache to take account of these preferences?

Arth
  • 353
  • 5
  • 14

1 Answers1

0

Turns out I had another file /etc/php.d/10-opcache.ini that was explicitly setting the unchanged settings.

Apparently these were overriding my new /etc/php.ini settings.

Moving all my intended opcache config to /etc/php.d/10-opcache.ini seems to have worked. Also there are some useful comments on what each setting does.

Arth
  • 353
  • 5
  • 14