• I’ve been having trouble getting WP-Super-Cache to work on a new server install.

    First I started with a clean install of Fedora 11 along with some standard php/apache modules.

    I then started setting up WordPress 2.8.4 with WP-Super-Cache 0.8.7 which is the setup I had currently working on a different server. But this gave me garbled text on the first load of a page, which wasn’t the case for the server running an older OS and the same setup.

    Sample Garbled Text: http://www.herewithme.fr/wp-content/uploads/2008/09/bug_wp_supercache.jpg

    I found a blog posts with a similar issue but all of the solutions points to bugs that seem to have already been fixed (gzip)

    I proceeded to try different combinations of WordPress and WP-Super-Cache (WP-2.8.4 + WP-SC-0.9.8), (WP-2.8.6 + WP-SC-0.8.7), (WP-2.8.6 + WP-SC-0.9.8), (WP-2.9.1 + WP-SC-0.9.8).

    All of the above combinations gave me the same result.

    I’ve setup .htaccess and created the link to the cache phase1 file and the WP-Super-Cache settings page doesn’t give me any errors.

    Setup:
    Fedora 11
    php 5.2.11
    apache 2.2.13
    * mod_rewrite
    * mod_gzip (also tried with this disabled)

    I am curious if there is any other areas I could look into to get this to work correctly?

Viewing 15 replies - 1 through 15 (of 20 total)
  • Do you have the same Apache modules on both servers?

    Thread Starter jeffreyrr

    (@jeffreyrr)

    Does WP-Super-Cache use mod_file_cache.so and/or mod_mem_cache.so?

    These are the only differences between my setups.

    Thread Starter jeffreyrr

    (@jeffreyrr)

    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

    Thread Starter jeffreyrr

    (@jeffreyrr)

    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?

    Thread Starter jeffreyrr

    (@jeffreyrr)

    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?

    Thread Starter jeffreyrr

    (@jeffreyrr)

    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.

    Thread Starter jeffreyrr

    (@jeffreyrr)

    @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.

    Thread Starter jeffreyrr

    (@jeffreyrr)

    @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

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘[Plugin: WP Super Cache] Garbled Text On First Page Load’ is closed to new replies.