Enabling Opcache does not work
I am trying to enable Opcache, but for some reason after editing the php.ini file and restarting Apache (even restarting the server) it still won't activate. Running the test I see that the location of the php files is:
Loaded Configuration File /etc/php5/apache2/php.ini
In this file, I added:
zend_extension=/usr/lib/php5/20121212/opcache.so
opcache.enable=1
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.fast_shutdown=1
opcache.enable_cli=1
The zend extension was located by locating opcache.so. It didn't work. Then I noticed that php is loading an additional file / etc / php 5 / apache2 / conf.d / 05-opcache.ini. In this file it looks like this:
; configuration for php ZendOpcache module
; priority=05
zend_extension=opcache.so
opcache.enable=1
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.fast_shutdown=1
opcache.enable_cli=1
However, after restarting apache, it still won't be enabled. My phpinfo () output displays the following:
Opcode Caching Disabled
How can I enable it?
+4
source to share
5 answers