On 03/05/2015 08:12 AM, j adams wrote: > I don't know if this is a question for the documentation team or not, but > figured I'd start here. There does not appear to be any definitive, clear, > reliable information on PHP's op caching functionality in recent 5.* > versions and this problem needs to be remedied. > > Question 1: Is OpCache enabled by default in php 5.5 and later or not? > > This page: > http://php.net/manual/en/intro.opcache.php > says "This extension is bundled with PHP 5.5.0 and later, and is ยป > available in PECL for PHP versions 5.2, 5.3 and 5.4." > > But this page: > http://php.net/manual/en/opcache.installation.php > says "PHP 5.5.0 and later > > OPcache can only be compiled as a shared extension. If you have disabled > the building of default extensions with --disable-all , you must compile > PHP with the --enable-opcache option for OPcache to be available. > > Once compiled, you can use the zend_extension configuration directive to > load the OPcache extension into PHP. This can be done with > zend_extension=/full/path/to/opcache.so on non-Windows platforms, and > zend_extension=C:\path\to\php_opcache.dll on Windows." > > > > Question 2: > If OpCache is enabled, does it require any php.ini settings or not? Does it > show any functions or constants or phpinfo() that will reveal its > existence? I've got php 5.6.6 installed on CentOS 7 and I can find neither > hide nor hair of it. There is, however, an opcache package one can install > (php56u-opcache.x86_64 in my case). > > > > Question 3: > What about Zend Optimizer? Still other articles say it has been integrated > into php 5.5 and later, but this mythical beast also makes no sign to > indicate its inclusion either. Some articles: > https://wiki.php.net/rfc/optimizerplus > https://wordpress.org/support/topic/looking-ahead-to-php-55-zend-optimizer-the-end-of-apc > http://www.internetnews.com/blog/skerner/php-5-5-to-include-open-source-zend-optimizer-.html
Opcache is bundled with PHP as of PHP 5.5, but distros like to unbundle things and provide them as separate packages. We can't do much about that and it is also hard to document all the variations distros come up with. So yes, in your case you need to install the opcache package. Presumably the way Centos has created the rpm it will add the appropriate magic ini settings and you will see opcache listed in your phpinfo() output after installing that package. And ZendOptimizer is the same as Opcache in this context. -Rasmus
signature.asc
Description: OpenPGP digital signature