These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for How do i enable OPCACHE on PHP55 on CentOS and Nginx on the new forum.
So i installed PHP5.5.6 via this manual: http://www.webtatic.com/packages/php55/
I also installed this: yum install php55w-opcache
But not sure what to do next? How do i enable the opcache?
I use Centos 6.4, with Nginx over FastCGI because PHP-FPM doesnt seem to be supported on Nginx module for Webmin/Virtualmin.
Thanks
Just stumbled across this question. If you have installed it correctly then adding the following to your php.ini should enable opcache:
[opcache]
opcache.enable=1
opcache.enable_cli=1
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.max_wasted_percentage=5
opcache.use_cwd=1
opcache.validate_timestamps=1
opcache.fast_shutdown=1
Obviously the setting may be different for your server (these numbers are generic), also you may want to use the global php.ini or the virtual server's php.ini . To test you have it running correctly you can run:
php -v
. As an example my out from this produces:PHP 5.5.10 (cli) (built: Mar 11 2014 17:37:46)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
Tweaking stuff like this can be a pita (although can be fun) and may cause conflicts. Things such as optimizing images, using cdns, using a good caching strategy or structurally changing your site will have a far greater impact on site speed.
P.S. I am a complete newbie who regularly breaks stuff and then pulls hair out trying to fix, so take my opinions as possibilities rather than fact!