Opcache not installed - W3TC


#1

Hi guys ! First congrats for the EasyEngine, made my life a lot easier.
Well, after I installed EE on DigitalOcean’s latest Ubuntu (14.04), I installed everything by the book ( I hope ), I went to the compatibility link on W3TC and says that “Opcode cache: Not installed”.
Is it normal ?

root@devly:~# php -v
PHP 5.5.12-2+deb.sury.org~trusty+1 (cli) (built: May 12 2014 13:48:43)
Copyright © 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright © 1998-2014 Zend Technologies
with Zend OPcache v7.0.4-dev, Copyright © 1999-2014, by Zend Technologies
with Xdebug v2.2.5, Copyright © 2002-2014, by Derick Rethans
root@devly:~#

And OPCache is configured by the “book” too.

; configuration for php ZendOpcache module
; priority=05
zend_extension=opcache.so
opcache.memory_consumption=512
opcache.max_accelerated_files=50000

;following can be commented for production server
opcache.revalidate_freq=0
opcache.consistency_checks=1

Am I missing something ?

Thanks !


#2

@alexblajan

PHP 5.5. has zend opcache support in core. Since APC is not updated from long time, we made a switch to new Zend Opcache. Below is our config and web-based stats viewer.

Ref: https://rtcamp.com/tutorials/php/zend-opcache/

You can view your opcache status at http://example.com:22222/cache/opcache/

NOTE: Replace example.com with your domain name or server public ip address


#3

Also for w3 total cache you can select Memcache for object and database caching

Attachment Link(s):

http://rtcamp.com/wp-content/uploads/rtMedia/topics/65916/2014/05/memcache.png


#4

Well, wait. You didn’t understand me. Just wanted to know if its normal that in the compatibility checklist, the OPCache doesn’t appear as being installed.
See printscreen.

Also, memcached and everything else is being checked. Also I have the Pro version of the W3TC with Fragment Cache ON.

Attachment Link(s):

http://rtcamp.com/wp-content/uploads/rtMedia/topics/65918/2014/05/Screen-Shot-2014-05-28-at-15.08.46.png


#5

You no need to worry about “Opcode cache: Not installed” line.

In my opinion, it’s a bug from W3 Total Cache as it fails to detect “PHP Zend Opcache”.

But since “PHP Zend Opcache” cannot be used for Database or Object Cache by W3 Total Cache plugin, this doesn’t matter much.

For Database and Object Cache, EasyEngine installs Memcache and configure W3 Total Cache plugin with Memcache.


Opcache
#6

I understand. Thanks for the quick reply.

One more thing. Can you check if my test server (page) is cached corectly ?
http://devly.co is the test server. fresh installed today.
Everything is done like in your tutorials, memcached + w3tc + nginx + percona, and I have the Fragment Cache in the W3Tc activated.


#7

Not sure about cache on your server. Your server doesn’t have page generation timestamp in HTML.

If you have created site with EasyEngine then it will have cache configured properly.

I never test fragment cache of W3 Total Cache so no idea about it.

We ourself use W3 Total Cache for object and database only. For page caching nginx’s fastcgi-cache is better than W3 Total Cache’s page cache.


#8

@Rahul I reinstalled the server and installed EE.
Also, I installed my test site with the --wpfc at the end.

After it installed Wordpress and after I setup the W3TC plugin and Nginx Helper, I tested the output of the cache.

It says:
root@devly:/var/www/devly.co/htdocs# curl http://devly.co/hello-world | tail -n 4 && echo -e
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 187 0 187 0 0 18888 0 --:–:-- --:–:-- --:–:-- 20777

–Cached using Nginx-Helper on 2014-05-29 13:32:39. It took 25 queries executed in 0.235 seconds.–>

–Visit http://wordpress.org/extend/plugins/nginx-helper/faq/ for more details–>
root@devly:/var/www/devly.co/htdocs#

After that I tested rtcamp and it says memcached.

What should I do ? Did I do something wrong ?


#9

anything ?


#10
After it installed WordPress and after I setup the W3TC plugin and Nginx Helper, I tested the output of the cache.

Did you enable following settings in w3 total cache

Database Cache – Memcache
Object Cache - Memcache
Browser Cache – Disabled


#11

@Mitesh yes. Everything is checked out. It’s a fresh Ubuntu 14.04 install, everything done like in the tutorial.
I didn’t mess with any configuration, just installed ee site create devly.co --wpfc ( i even tested with --w3tc ). The output to curl is Nginx-helper not memcached.


#12

P.S. everything seems installed so I don’t know. I even disabled cache purge from nginx helper just to see if it works.


#13

Its seems your site also displaying memcache

curl -s  devly.co | tail -n5  
Database Caching using memcached  
Object Caching 473/633 objects using memcached  
Fragment Caching 0/0 fragments using memcached  

 Served from: devly.co @ 2014-06-03 09:30:01 by W3 Total Cache -->

#14

Thanks. I tried and shows me the same output. I tried with the same output Rahul wrote in one of his tutorials. ( curl http://devly.co/hello-world | tail -n 4 && echo -e )

Maybe the article is not cached ?


#15

Your hello-word is redirect to another page

 curl -I http://devly.co/hello-world            [15:13:18]  
HTTP/1.0 301 Moved Permanently  
Server: nginx  
Date: Tue, 03 Jun 2014 09:44:03 GMT  
Content-Type: text/html; charset=UTF-8  
X-Pingback: http://devly.co/xmlrpc.php  
X-Powered-By: W3 Total Cache/0.9.4  
Expires: Wed, 11 Jan 1984 05:00:00 GMT  
Cache-Control: no-cache, must-revalidate, max-age=0  
Pragma: no-cache  
Location: http://devly.co/2014/06/03/hello-world/  
X-Powered-By: EasyEngine  
Vary: Accept-Encoding  
X-Cache: MISS from localhost  
X-Cache-Lookup: MISS from localhost:3128  
Via: 1.0 localhost (squid/3.1.20)  
Connection: keep-alive  

Lets test actual url

curl -s http://devly.co/2014/06/03/hello-world/ | tail -n5   
Database Caching using memcached  
Object Caching 595/756 objects using memcached  
Fragment Caching 0/0 fragments using memcached  

 Served from: devly.co @ 2014-06-03 09:42:51 by W3 Total Cache -->%

#16

Great. so that means everything is ok. Thanks a lot !


#17