Zend OPcache is the new open source opcode PHP cache that is now bundled with PHP 5.5. I had just upgraded one of my servers running Ubuntu 12.04 to use Apache 2.4.6 and PHP 5.5.4.
So how does one install it? I initially thought I had to just edit the php.ini file since there are a bunch of new settings for the opcache. I set mine similar to the recommended default and did not enable `cli` caching.
opcache.memory_consumption=128 opcache.interned_strings_buffer=6 opcache.max_accelerated_files=2000 opcache.revalidate_freq=60 opcache.fast_shutdown=1
Restarting Apache however and I saw that it was still disabled , even though I had also set
A quick poking around the /php5 dir and I could see there was an opcache.ini set under /php5/mods-available which called the extension. This should work but to be honest what is a /mods-available doing in /php5 ? I guess this is something new. A quick look for the actual extension showed that the
opcache.so was in
Th good news was that everything was there and to enable it I just had to add a full link to
zend_extension=/usr/lib/php5/"some numerical dir"/opcache.so
and reboot Apache.
This is pretty much exactly what is says on http://php.net/manual/en/book.opcache.php but for some reason I could not read it.