Do you have the same Apache modules on both servers?
Does WP-Super-Cache use mod_file_cache.so and/or mod_mem_cache.so?
These are the only differences between my setups.
It seems the maintainer of Apache on the Fedora Project decided it wasn’t necessary to bundle.
https://bugzilla.redhat.com/show_bug.cgi?id=505048
I still need a confirmation that WP-Super-Cache uses these modules. And if so, that it is properly documented in WP-Super-Cache as a prerequisite.
Thanks
Something to note: mod_disk_cache is still available.
Haven’t heard of those modules and they’re not needed. If they’re enabled on the site that works then they’re not conflicting with anything but otherwise… If they’re on the broken site, then disable them?
Old (Working):
+mod_file_cache
+mod_mem_cache
New (Not Working):
-mod_file_cache
-mod_mem_cache
I am so confused as to why this isn’t working.
Any debugging help would be appreciated, not sure where to go from here.
Check the headers your new server sends. How do they differ from the headers on the old server?
These are the response headers: http://pastebin.com/m14b2f75c
Fresh = first page load
Cached = subsequent page loads
Things I noticed:
* New server’s cached page load doesn’t have the “WP-Super-Cache” header
* New server’s cached page load doesn’t have the “X-Pingback” header
* New server’s fresh page load (with garbled text) has a different Vary header (only has Cookie, doesn’t include Accept-Encoding like the others)
The Vary header should have the Accept-encoding header when you use gzip compression. I don’t know why this is happening, sorry!
It looks like your old server is using the plugin in half-on mode. The “WP-Cache” header only shows when cache files are served by PHP.
@donncha: I was curious if this debug dump would help. This is from the debug option in wp-super-cache.
These were the outputs that stood out, the others were pretty generic.
non-gzipped buffer (this took place with the compression option both enabled and disabled, it caused no change)
Writing non-gzipped buffer to wp-cache cache file.
This seems to be the headers dumped
a:5:{s:7:"headers";a:4:{s:4:"Vary";s:12:"Vary: Cookie";s:12:"Content-Type";s:38:"Content-Type: text/html; charset=UTF-8";s:10:"X-Pingback";s:46:"X-Pingback: http://blog2.domain.com/xmlrpc.php";s:13:"Last-Modified";s:44:"Last-Modified: Fri, 15 Jan 2010 21:22:30 GMT";}s:3:"uri";s:17:"blog2.domain.com/";s:7:"blog_id";i:1;s:4:"post";i:0;s:3:"key";s:33:"blog2.domain.com/WP Cookie check,";}
This is an example of the bad output.
I have the exact problem. All the pages only work on every second load.
Once the second, pages loads up, everything looks good and the source code has all the right gzip info. Enabling the compression on the WP Super Cache makes no difference. The only way to get it working is to switch it off. And I need the cache as the live site will have heavy load.
It’s on a virtual server:
http://h1678896.stratoserver.net/
for php
http://h1678896.stratoserver.net/phpinfo.php
safe_mode off
zlib enabled
zlib.output_compression on
zlib.output_compression_level 2
zlib.output_handler no value
this are the values I’ve changed since people were suggesting them on the net.
like jeffreyrr, it only started since I moved server.
I’ve tried just about everything I can think for 3 days now. No luck. Any help would be very appreciated.
Decided to with DB Cache Reloaded instead.
Would still be interested to know what the fix for it though.
Thanks.
Nafkot – you have zlib output_compression on. That’s what’s causing the problem.
jeffreyrr – do you have that enabled in your php.ini?
Oh, see point 21 in the troubleshooting section of the readme.txt. I’m adding a check for php zlib compression now that will warn the user if zlib compression is on.
@donncha i dont see a point 21 in troubleshooting. It only goes up to 20.
I did however narrow down the bug to zlib.output_compression as well. Unfortunately its not sending the “Content-Encoding: gzip” header, even though gzipped data is sent.
It seems to be related to this bug report: http://j.mp/69KSm9. Which was fixed in August 2009 (5 months ago).
I am guessing that my release of php didn’t include this fix, which is odd because I am running 5.2.11 which was released September 2009 (1 month after the fix was committed).
I included a patch which works for me, but i am not sure if this should be included in wp-super-cache as it is fixing a problem that doesn’t exist within your code. And it could also potentially create problems for others.
I am basically sending the gzip header under 1 circumstance.
1) PHP version is 5.2.11 (i don’t know what other versions of PHP have this bug)
2) zlib.output_compression is set to ‘On’ (this is where the bug exists)
3) Browser sends “Accept-Content: gzip” (browser accepts gzip, thus php will send gzipped data when zlib.output_compression is On under the hood)
When all 3 of these cases are matched then it assumes PHP’s zlib isn’t sending the proper headers.
Here’s the link to the patch: http://j.mp/6hMkm2