This object is in archive! 
EasyApache: Zend Opcache for PHP 5.5
Completed
Zend Opcache is included in the source tree for PHP 5.5, but it is not enabled by default, and is not exposed in EasyApache. This is a compelling new feature, and important for performance reasons, since eAccelerator and Xcache are no longer available with PHP 5.5.
Hi everyone,
Thanks for all your interest in Opcache. Thanks to Neso for providing the line to enable Opcache. EasyApache is planning on enabling Opcache by default in the near future. Please watch the feature request and our EasyApache change log for updates.
Hi everyone,
Thanks for all your interest in Opcache. Thanks to Neso for providing the line to enable Opcache. EasyApache is planning on enabling Opcache by default in the near future. Please watch the feature request and our EasyApache change log for updates.
For everybody that wish to activate OPcache, you need just to add one line to your php.ini file:
In my case this was:
zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20121212/opcache.so
Also under that line you can add these configuration settings if you wish to increase memory etc.
opcache.memory_consumption=256
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.fast_shutdown=1
opcache.enable_cli=1
opcache.enable=1
And one more thing, if you wish to track memory usage etc.
You can use this: https://gist.github.com/ck-on/4959032/?ocp.php
For everybody that wish to activate OPcache, you need just to add one line to your php.ini file:
In my case this was:
zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20121212/opcache.so
Also under that line you can add these configuration settings if you wish to increase memory etc.
opcache.memory_consumption=256
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.fast_shutdown=1
opcache.enable_cli=1
opcache.enable=1
And one more thing, if you wish to track memory usage etc.
You can use this: https://gist.github.com/ck-on/4959032/?ocp.php
it works ;)
it works ;)
Thank you very much, Neso.
Thank you very much, Neso.
What about it built in?
Can it be implemented in a easier manner?
Thanks cPanel,
What about it built in?
Can it be implemented in a easier manner?
Thanks cPanel,
Hi everyone,
Thanks for all your interest in Opcache. Thanks to Neso for providing the line to enable Opcache. EasyApache is planning on enabling Opcache by default in the near future. Please watch the feature request and our EasyApache change log for updates.
Hi everyone,
Thanks for all your interest in Opcache. Thanks to Neso for providing the line to enable Opcache. EasyApache is planning on enabling Opcache by default in the near future. Please watch the feature request and our EasyApache change log for updates.
OK, I installed it according to the instructions here — and it does make a noticeable improvement on our sites — does a new EasyApache install delete it? How can we protect it?
Once you add it to EasyApache, does that replace this installation and settings or what?
Peace,
Gene
OK, I installed it according to the instructions here — and it does make a noticeable improvement on our sites — does a new EasyApache install delete it? How can we protect it?
Once you add it to EasyApache, does that replace this installation and settings or what?
Peace,
Gene
Hi Gene,
Perform these steps to enable the Zend OPcache extension in PHP when using EasyApache:
1. Create the file, /var/cpanel/easy/apache/rawopts/all_php5, that contains the following text: --enable-opcache
( NOTE: Each option passed to PHP needs to be on its own line. If this file already exists, then place this text at the end of the file, on its own line. )
2. Run EasyApache
3. Once you've successfully built your web stack using EasyApache, enable and configure OPcache by editing /usr/local/lib/php.ini with settings that suit your server's needs.
4. Restart your webserver: /usr/local/cpanel/scripts/restartsrv_httpd
5. If you want to verify that OPcache is enabled under Apache, then create a PHP page that executes the phpinfo() function. Search for the "Zend OPcache" phrase.
6. Remove the temporary PHP page after you've verified.
Performing these steps ensures that OPcache remains enabled when running EasyApache. Refer to PHP's OPcache documentation to learn more about configuring Zend Opcache.
Hi Gene,
Perform these steps to enable the Zend OPcache extension in PHP when using EasyApache:
1. Create the file, /var/cpanel/easy/apache/rawopts/all_php5, that contains the following text: --enable-opcache
( NOTE: Each option passed to PHP needs to be on its own line. If this file already exists, then place this text at the end of the file, on its own line. )
2. Run EasyApache
3. Once you've successfully built your web stack using EasyApache, enable and configure OPcache by editing /usr/local/lib/php.ini with settings that suit your server's needs.
4. Restart your webserver: /usr/local/cpanel/scripts/restartsrv_httpd
5. If you want to verify that OPcache is enabled under Apache, then create a PHP page that executes the phpinfo() function. Search for the "Zend OPcache" phrase.
6. Remove the temporary PHP page after you've verified.
Performing these steps ensures that OPcache remains enabled when running EasyApache. Refer to PHP's OPcache documentation to learn more about configuring Zend Opcache.
Hi,
Does this still work?
=> Create the file, /var/cpanel/easy/apache/rawopts/all_php5, that contains the following text: --enable-opcache
I tried that but it didn't work. The content of all_php5:
--enable-fastcgi
--enable-fpm
--enable-opcache
Thanks!
Hi,
Does this still work?
=> Create the file, /var/cpanel/easy/apache/rawopts/all_php5, that contains the following text: --enable-opcache
I tried that but it didn't work. The content of all_php5:
--enable-fastcgi
--enable-fpm
--enable-opcache
Thanks!
At least provide direct support as experimental or have an official how to guide. Unless you follow specific Cpanel guidelines the next update will break this, overwrite or remain custom config ...
At least provide direct support as experimental or have an official how to guide. Unless you follow specific Cpanel guidelines the next update will break this, overwrite or remain custom config ...
Have any plan when its will be done ?
Have any plan when its will be done ?
@ Scott.
We are still waiting....
Could you please define "near future". Easy Apache has been updated 15 times since you wrote on this feature request. I think 7 months is a bit long time for such a simple thing. It's not that big fix, this feature request is about.
Regards
Bastian Jorgensen
@ Scott.
We are still waiting....
Could you please define "near future". Easy Apache has been updated 15 times since you wrote on this feature request. I think 7 months is a bit long time for such a simple thing. It's not that big fix, this feature request is about.
Regards
Bastian Jorgensen
Yeah a built in way on EA4 to turn on and off this feature would be great!
Thank you.
Yeah a built in way on EA4 to turn on and off this feature would be great!
Thank you.
I just did an installation like explained before, it worked but I had to change my PHP Loader from suphp to fcgi.
With suphp opcache was started at every request and the cached files weren't preserved.
Hope this helps someone.
I just did an installation like explained before, it worked but I had to change my PHP Loader from suphp to fcgi.
With suphp opcache was started at every request and the cached files weren't preserved.
Hope this helps someone.
Does this mean we need to open ANOTHER feature request to actually include as part of EasyApache? Please advise - Until it is IMO this feature is not complete. thx."Zend Opcache is included in the source tree for PHP 5.5, but it is not enabled by default, and is not exposed in EasyApache. "
Does this mean we need to open ANOTHER feature request to actually include as part of EasyApache? Please advise - Until it is IMO this feature is not complete. thx."Zend Opcache is included in the source tree for PHP 5.5, but it is not enabled by default, and is not exposed in EasyApache. "
I see in the changelog at https://documentation.cpanel.net/display/EA/EasyApache+Change+Log that there is now an optmod to install zend opcache, but I do not see it in the list at https://documentation.cpanel.net/display/EA/Custom+Modules .
I see in the changelog at https://documentation.cpanel.net/display/EA/EasyApache+Change+Log that there is now an optmod to install zend opcache, but I do not see it in the list at https://documentation.cpanel.net/display/EA/Custom+Modules .
Until this is in EASYAPACHE and fully supported, it should not be marked completed!
Until this is in EASYAPACHE and fully supported, it should not be marked completed!
Oh wait I found it! I'm not sure why the changelog calls it an Opt Mod though. It's in "Exhaustive Options List" in the php section and is just called "Opcache".
Oh wait I found it! I'm not sure why the changelog calls it an Opt Mod though. It's in "Exhaustive Options List" in the php section and is just called "Opcache".
Replies have been locked on this page!