WordPress SuperCache-Plus plugin

This article is really out of date.
SuperCache-Plus has moved.

We don't need no steenkin' brakes

What do you get if you cross WP-Super Cache with the eAccelerator shared memory key storage engine?

Well; there's a fair chance that it'll be an internal server error, but thankfully I've moved beyond that before revealing the existence of this plugin to the world at large.

 

If you're ready to enter the dizzying world of WordPress performance beyond your wildest dreams then read on...

 

Update: This plugin isn't just for eAccelerator now.

It now includes storage backends for Disk, eAccelerator, APC, XCache, Zend-Cache and Memcached(x2).

It's not really experimental now either.

 

Improvements/changes over WP-Super-Cache

  • Supports multiple storage back-ends; currently Disk (just like the original), eAccelerator (much faster on my server - 50% faster if I use shm_only for keys and about 45% faster with the default shm_and_disk), APC, Memcached, XCache & Zend-Cache.

    More back-ends may follow.

  • Will send 304 Not Modified responses where appropriate.

  • Garbage collection is entirely automatic in the background.
    No admin settings or intervention is required.

  • Switchable Last-Modified headers so GoDaddy shared hosting doesn't throw a seven.

  • WP-Cache (not SuperCache) respects Cache-Control:max-age=0, Cache-Control:no-cache and Pragma:no-cache cache control headers.

  • Debug logging.

  • Support for multiple servers on different ports.

  • Support for purging frontend caches like Squid, Varnish etc.

  • Some other stuff

Non-Improvements

  • Disk based storage may be slightly slower than original WP-Super-Cache due to function call overhead, however I believe that this is more than compensated for by the 304 capability.

    Raw benchmarks don't necessarily tell the whole story.

  • eAccelerator, APC, XCache & Zend-Cache speed is not as ultimately fast as it could be for the same reason. It's a few percent slower than using inline code, but that would require separate plugins or some serious rocket science.

 

See changelog for more details.

 

About

This WordPress plugin is based on WP-Super Cache but replaces the WP-Cache filesystem storage with eAccelerator1 or some other storage. The mod_rewrite 'Super Cache' functionality is essentially unchanged and mfunc / mclude handling is still in there.

More haste, less speed

The idea behind doing it was that it would be faster for cookied page views than the standard WP-Cache system, and indeed this seems to be the case. My server showed a 45% increase in requests per second. Your mileage may vary, but you too could easily see performance gains of up to and including more (or less) than that. Speed from the Super Cache via mod_rewrite is not affected.

 

This plugin may be for you if...

  • Your site is on a server.

  • You want to use eAccelerator, Memcached, XCache, Zend-Cache or APC storage and you understand how to configure it.

 

This plugin is probably NOT for you if...

  • Your site is not on a server.

  • You don't know whether or not your site is on a server.

  • You know your site is on a server, but don't know how to configure it.

 

Deficiencies

  • I don't know much about WordPress-MU since I don't use it and I've had limited feedback on how this plugin functions in that environment. It's written with multiple sites in mind and seems to work OK.

 

Back to the positive side of things

You can (assuming I have eAccelerator enabled right now) see a sample of it in action2 on this server by hopping over to the eAccelerator stats page for this site.

 

Crikey!

 

Anyway, if you're feeling adventurous or just easily dazzled by new shiney things - Download the plugin and give it a whirl.

Remember:

  1. This isn't an add-on for WP-Super Cache. You must disable it and make sure that its version of /wp-content/advanced-cache.php is removed or renamed.

 

Cache early, cache often!

 

  1. The configuration of eAccelerator determines the actual storage method, but you knew that anyway
  2. See some cryptic eAccelerator statistics
  • Reddit

Pages: 1 2

Back to top ↑

Activity

RSS
214 total comments, leave your comment or trackback.
  1. Donncha O Caoimh

    Jul 25th 2008
    #

    Great job! I must take a look at it. I have plans on abstracting the writing process in wp-super-cache so that different backends can be bolted on. If your server really saw an increase of 45% in traffic served that’s proof that it’s worth doing!


  2. DG

    Jul 26th 2008
    #

    Donncha, I’m agreed it’s better if you take over and add the support XCache, eAccelerator, memcached, APC etc. rather than floating different versions of Super Cache around, because this’ll create more confusion and top of all, since the backend of the plugin is same. It’s better maintained at one place.

    Yeah, you can consider adding the author to your coding list of Super Cache for managing XCache etc. part.

    DG…


  3. Murmatron Server Admin
    Admin Avatar
    Aug 2nd 2008
    #

    Updated to sync with WP-Super Cache 0.6.6


  4. Murmatron Server Admin
    Admin Avatar
    Aug 20th 2008
    #

    I just noticed that some people have actually subscribed to these comments.

    Lots of changes and fixes. (although I guess that depends on how long ago you were here).


  5. Murmatron Server Admin
    Admin Avatar
    Sep 2nd 2008
    #

    Released version 0.5.55.555

    Storage backend selection in WP Admin UI finally implemented.

    More changes than you can shake a stick at.

    Changelog


  6. [...] Den Download findet man hier. [...]


  7. Lazy

    Sep 18th 2008
    #

    Hi ;)

    i tried the Plus Plugin because it sounds really good. I think it is working well. Only APC Stats gave me no hits just misses.. and i do not know exactly why.

    I used Wp Super Cache with an APC Object-Cache.php – i killed both and activated your plugin, but the apc stats only showed me misses.

    Sorry for my bad english

    nice greetings ;)

    Chris


  8. Murmatron Server Admin
    Admin Avatar
    Sep 18th 2008
    #

    Hi Lazy,

    If you’re referring to the APC-Cache stats on the Plugin admin page, then you probably won’t see any Hits if it’s just you browsing. You’ll see the 304s (sent Not Modified response) number go up instead. This is better than a hit since no content is sent, just the header.

    The stats shown on the admin page are incomplete for APC at the moment – for example, the number of cached pages, expired pages etc. doesn’t work yet. APC has it’s own built in stats which I need to work out how to use. :)

    If you mean that APC’s built in stats (apc.php) aren’t showing any hits then that’s bad and I’m not sure what the problem is – I’ve been using eAccelerator for years and only installed APC last night to develop the plugin backend. It definitely works for me, without even configuring any of APC’s settings.

    Also; this plugin should work just fine with the APC Object-Cache active at the same time. They do different things, although APC memory usage could be an issue.


  9. Lazy

    Sep 18th 2008
    #

    Hi,

    thank you very much for you detailed answer – now i see clear. So i can use it instead of wp super cache. :)

    Have a nice day – i am looking forward to the next release ;)

    sincerely
    Chris


  10. Murmatron Server Admin
    Admin Avatar
    Sep 24th 2008
    #

    In a determined effort not to reach version 0.6, I have released Version 0.5.9.5


  11. Dave Hope

    Sep 26th 2008
    #

    Heya,

    Just installed 0.5.9.5 and it died straight away when trying to activate the plugin:

    Parse error: syntax error, unexpected ‘.’, expecting ‘(‘ in /www/wp-content/plugins/wp-supercache-plus/wp-cache.php on line 65

    Dave


  12. Murmatron Server Admin
    Admin Avatar
    Sep 26th 2008
    #

    Dave,

    That’s strange. It activates and deactivates just fine here. I always test that very thing before release just in case I’ve broken something.

    What version of PHP are you using? That error sounds suspisciously like PHP4 trying to do something that requires PHP5. I thought that I’d been pretty careful in that respect but maybe something that I’ve done doesn’t work with older versions of PHP.


  13. Dave Hope

    Sep 26th 2008
    #

    Ahh, I didn’t realise PHP5 was required.

    I’m running PHP Version 4.4.9 with Wordpress 2.6.2

    If you’re after more info feel free to e-mail you and I’ll give you any info that might help :)


  14. Murmatron Server Admin
    Admin Avatar
    Sep 26th 2008
    #

    Ahh, I didn’t realise PHP5 was required.

    Neither did I :( It wasn’t intentional, so I guess I’ll have to set up a PHP4 server and in the mean time put a PHP5 required warning next to the download.


  15. Murmatron Server Admin
    Admin Avatar
    Oct 20th 2008
    #

    Released Version 0.6

    Hopefully this release removes the requirement for PHP5. PHP4 should be OK now, but is currently untested beyond a php -l syntax check (with v4.4.8).

    Now includes more speed (as the somewhat ironic result of removing all the static class members) and new (optional, off by default) debug logging.


  16. Murmatron Server Admin
    Admin Avatar
    Nov 2nd 2008
    #

    Released Version 0.6.5

    New improved SuperCache expiry method.

    Finally; a use for all those .postid files that have been floating around.


  17. shami

    Nov 2nd 2008
    #

    Hello .. I am Taiwanese, English is not good, please forgive me …
    I use your plug-in
    However, “WP-Cache Storage Engine” option, only show “Disk”
    I server architecture is “Nginx + php5 + eAccelerator + ZendOptimizer”
    I want to “WP-Cache Storage Engine” option, the use of “eAccelerator”
    Do not know how to be an additional set of normal use?


  18. Murmatron Server Admin
    Admin Avatar
    Nov 2nd 2008
    #

    Shami,

    I’m not sure what is going on there. The plugin just checks if the eaccelerator_put function can be used in PHP. If it can, it means that the eAccelerator API is available and the eAccelerator option will be in the list.

    The eAccelerator trouble shooting page does say this…

    eAccelerator has been reported to work with Zend Optimizer’s loader. Zend Optimizer must be installed after eAccelerator in php.ini so it’s loaded after eAccelerator. If you don’t use scripts encoded with Zend Encoder then we do not recommend installing Zend Optimizer with eAccelerator, and it won’t give you any extra performance.

    Maybe the problem is Zend Optimizer.


  19. shami

    Nov 3rd 2008
    #

    Thank you for answering my question.
    But I will be banned ZendOptimizer. Server after the restart.
    WP-Cache Storage Engine options are still only “Disk

    I also have the use of eAccelerator WordPress Object Cache. I do not know whether there would be a conflict?

    This is my eAccelerator settings. Settings on whether or not there is room for improvement?

    [eaccelerator]
    zend_extension = "/usr/lib/php5/20060613+lfs/eaccelerator.so"
    eaccelerator.shm_size = "128"
    eaccelerator.cache_dir = "/tmp/eaccelerator"
    eaccelerator.enable = "1"
    eaccelerator.optimizer = "1"
    eaccelerator.check_mtime = "1"
    eaccelerator.debug = "0"
    eaccelerator.filter = ""
    eaccelerator.shm_max = "0"
    eaccelerator.shm_ttl = "0"
    eaccelerator.shm_prune_period = "0"
    eaccelerator.shm_only = "0"
    eaccelerator.compress = "1"
    eaccelerator.compress_level = "9"
    eaccelerator.keys = "shm_and_disk"
    eaccelerator.sessions = "shm_and_disk"
    eaccelerator.content = "shm_and_disk"

    If it is convenient to be able to use your current WP-SuperCache Plus and compression settings give me a test to see if I refer to?

    I regret to trouble you again …


  20. Murmatron Server Admin
    Admin Avatar
    Nov 3rd 2008
    #

    Your eAccelerator settings look OK to me, but that doesn’t mean it’s working properly.

    There is no conflict between WP-SuperCache-Plus and the Object-Cache.

    It’s late here now, but I’ll try to devise a test tomorrow that might help to find the problem.


  21. shami

    Nov 3rd 2008
    #

    Today, I tried to disable eAccelerator .. opening of the APC .. WP-Cache Storage Engine options have been able to use the normal APC .. but Cache Contents show that the information “Cache misses: 75 = 64%” .. Does this mean hit Rate is not high?

    So I would like to try to compare the use of eAccelerator cache .. I have tried to re-install eAccelerator still can not use it .. and so had no choice but to take a look at the present you have no way to solve this problem ..

    I can not fault the article published by the Bank of strange .. I had no choice but to use the “..” to separate .. cause you trouble with you to say sorry ..


  22. Murmatron Server Admin
    Admin Avatar
    Nov 3rd 2008
    #

    I’ve spent some time looking at this problem and have come to the conclusion that the only way that eAccelerator will not be included in the list is if it isn’t working properly. There are myriad reasons why any of those PHP caches don’t or won’t work on any particular server and I’m afraid that I can’t really help out with that.

    I’ll also take this opportunity to recommend not installing eAccelerator, APC or anything else just to use this plugin. You’re multiplying your chances of failure. WP-SuperCache-Plus works without them and the extra functionality of the pluggable storage backends is really aimed at those who are already using those caching systems.

    All I can say for certain is that if it’s installed and configured correctly, then the plugin will give you the option of using it.


  23. shami

    Nov 5th 2008
    #

    Thank you to help me try to solve the problem.
    I guess because I could use the server when Nginx Kansai, right?
    I currently use memcached + eaccelerator.
    I do not know wp-supercache-plus version of the following will not support memcached?


  24. Murmatron Server Admin
    Admin Avatar
    Nov 5th 2008
    #

    WP-SuperCache-Plus will support memcached. It’s one of the things that I’m working on, but I’ve also been very good at finding reasons to avoid it since memcached is a bit more complicated than the others.

    I’ll probably do it after the next release which, for those who are interested, may well include support for purging frontend reverse proxy caches like Squid, Varnish etc. when posts are edited, deleted and suchlike.

    I have a roadmap. Unfortunately, it’s covered in multiple pile-ups.


  25. Murmatron Server Admin
    Admin Avatar
    Nov 7th 2008
    #

    Released Version 0.6.6

    Added support for purging frontend caches – Squid, Varnish etc.


  26. shami

    Nov 7th 2008
    #

    Today upgrade to version 0.6.6.
    There are also follow readme.txt note to set the eaccelerator.
    Or can not use it eaccelerator cache buffer.
    It seems like I missed the eaccelerator …
    Memcached look forward to support the arrival of the …….


  27. Murmatron Server Admin
    Admin Avatar
    Nov 8th 2008
    #

    Released Version 0.6.6.6

    Finished APC storage backend – it now has the same capabilities as Disk & eAccelerator.

    Moving on to do memcached which will probably take a while.


  28. Murmatron Server Admin
    Admin Avatar
    Nov 10th 2008
    #

    Released Version 0.6.7

    Fixed (rare) possibilty of residual tmp files in SuperCache directory.


  29. Gene Steinberg

    Nov 12th 2008
    #

    I have eAccelerator installed properly under cPanel. I verified that and the performance improvement on my sites. However, your plugin, version 0.6.7, only presents a Disk based storage engine option.

    I’m using WP 2.6.3 (is it compatible with the 2.7 betas?)

    So what’s going on here?

    Peace,
    Gene Steinberg


  30. ovidiu

    Nov 12th 2008
    #

    hey guys, whats the current status?
    is this plugin up to date? or is it using an old version of wp super cache?


  31. Murmatron Server Admin
    Admin Avatar
    Nov 12th 2008
    #

    Gene,

    You’re the second report of this and I’ve been thinking about probable causes again and have to revise my assertion from my earlier discussion with Shami.

    The most likely cause is that eAccelerator has been built (deliberately or by accident – I know not which) without the --with-eaccelerator-shared-memory compile option.

    According to the Compile Configuration page, that option was on by default up until v0.9.5 which implies that it’s disabled by default in newer releases.

    The plugin tests for the eaccelerator_put function which is not available without this compile option; thus you see all the benefits of eAccelerator working, but the plugin can’t use the missing bit.

    As for WordPress version – I develop and run it on both the svn trunk and 2.6.3, so yes it works on 2.7


  32. Murmatron Server Admin
    Admin Avatar
    Nov 12th 2008
    #

    ovidiu,

    This plugin is based on WP-SuperCache 0.6.something. Most of the major issues found with that plugin have been included in this although they haven’t necessarily been addressed in the same way.

    There’s some divergence, some extra functionality, some things have been removed and some things have stayed the same.

    The lastest release was the day before yesterday, so it’s about as up-to-date as I can manage.


  33. ovidiu

    Nov 12th 2008
    #

    same problem here, only disk based storage engine is available. I compiled eaccelerator by hand and it is working as desired. Using
    eAccelerator 0.9.5.3 [shm:mmap_anon sem:spinlock]
    PHP 5.2.0-8+etch13 [ZE 2.2.0]
    and wp 2.6.3


  34. ovidiu

    Nov 12th 2008
    #

    btw. one of my comments is stuck in your moderation queue because I had included 2 links:

    Your comment is awaiting moderation. and how well does this play with this plugin: http://neosmart.net/dl.php?id=14 or with this one: http://neosmart.net/dl.php?id=13 ?


  35. Gene Steinberg

    Nov 12th 2008
    #

    One more thing: As with another person reporting the problem, I am also using Nginx. Is that the issue?

    Peace,
    Gene


  36. Murmatron Server Admin
    Admin Avatar
    Nov 12th 2008
    #

    I’m somewhat at a loss here as to why you aren’t getting the eAccelerator option in the list.

    It literally comes down to this single line of code at the beginning of storage/eaccelerator.php

    $_WPSCP_storage_available = function_exists('eaccelerator_put');

    I considered it pretty emphatic – the function either exists or it doesn’t, but perhaps on certain platforms, configurations or with certain PHP extensions, function_exists is unreliable.

    Edit: Forcing one of the storage engines to work by overriding the availability test probably isn’t a good idea. Fatal errors are what you’ll get. I’m leaving it in for the sake of continuity of discussion.

    You could try changing that line to…

    $_WPSCP_storage_available = true;

    …and see if anything useful happens beyond getting the option in the list and warnings in your logs.

    I really don’t know if Nginx is a factor or not. I’m assuming that PHP is done using some kind of fast-cgi setup with Nginx. Surely PHP extensions work just as well in that environment as in Apache mod_php. It wouldn’t have gained as much traction as a platform if they didn’t.

    With respect to the Neosmart object-caches, I’ve already done an updated eAccelerator one here that implements some extra stuff that’s important in newer versions of WordPress. I don’t use it though since on this server it doubles page generation time.

    Any incarnation of object-cache.php is compatible with my SuperCache plugin since they do different things entirely. The eAccelerator object-cache does require a functional eaccelerator_put though :(

    Just for the record, this server is running the latest version of the WP-SuperCache-Plus on:

    • Windows 2000
    • Apache 2.2.9
    • PHP 5.2.6
    • eAccelerator 0.9.5.3
    • WordPress 2.6.3

    I’m really keen to get to the bottom of this but with so many variables it’s not easy.


  37. Gene Steinberg

    Nov 12th 2008
    #

    I got the option. I enabled it, and the site still works. So maybe we’re progressing. Would I be correct in assuming that, if eAccelerator wasn’t operational, something would go wrong?

    Peace,
    Gene


  38. Gene Steinberg

    Nov 12th 2008
    #

    On second thought, it didn’t.

    What it says at the bottom of the settings page is:

    Fatal error: Call to undefined function eaccelerator_get() in /home/macnight/public_html/newsletter/wp-content/plugins/wp-supercache-plus/storage/eaccelerator.php on line 235

    So that doesn’t help. It needs another way to know eAccelerator is present and accounted for.

    Peace,
    Gene


  39. Gene Steinberg

    Nov 12th 2008
    #

    And there’s one more problem even with the Disk selected as storage engine.

    I’m getting 0 cached files and this error message:

    Warning: closedir(): supplied argument is not a valid Directory resource in /home/macnight/public_html/wp-content/plugins/wp-supercache-plus/storage/disk.php on line 339

    So?

    Peace,
    Gene


  40. Murmatron Server Admin
    Admin Avatar
    Nov 12th 2008
    #

    It needs another way to know eAccelerator is present and accounted for.

    There isn’t one. A Fatal Error calling an eAccelerator API function means that for the purpose at hand that function is not present and accounted for. It seems that the function_exists result was telling the truth. The function isn’t callable, but why is another matter. It isn’t a failure in my plugin in so far as I can only work with what’s available.

    The Disk problem seems likely to be the result of the plugin failing (due to lack of write permissions for server process) to create the directories:

    wp-content/cache

    wp-content/cache/meta

    wp-content/cache/supercache

    Creating a wp-content/cache directory that is writeable by the web server and de-re-activating the plugin would be my suggestion.

    As an added bonus – I forsee rewrite and other .htaccess related problems on servers other than Apache.


  41. Gene Steinberg

    Nov 12th 2008
    #

    It also failed to enable the cache in the wp-config file, and the update process for .htaccess wasn’t succeeding. Note that I never had problems with any of this stuff with the original WP Super Cache.

    In any case, I can bring some of the issues to my server admin person and let him handle that, but I need to know what to tell him and what to test for as far as eAccelerator is concerned. Remember that it’s a standard option with cPanel’s EasyApache feature, so lots of people are installing it the same way I did.

    Peace,
    Gene


  42. Murmatron Server Admin
    Admin Avatar
    Nov 12th 2008
    #

    I’ll certainly look into those installation issues in more detail, but I am surprised since those are the areas least changed from the original WPSC. The contents of the config files and .htaccess files are quite different, but the location and mechanism for installing and checking them isn’t – the notable exception being the meta directory which is created and destroyed by the Disk storage engine rather than the main plugin.

    As for the non-functional eAccelerator, I can’t do anything other than go by the return value of function_exists('eaccelerator_put'). I’m not arguing that there isn’t something interesting or strange at work there, but it’s clearly outside of the plugin and on the evidence; if the test says it won’t work, it doesn’t.


  43. Gene Steinberg

    Nov 12th 2008
    #

    Well, I await further word from you about this. Meantime, since you have my email address (as entered), feel free to write me privately with any information I can provide my admin for further investigation on our part.

    Peace,
    Gene


  44. Murmatron Server Admin
    Admin Avatar
    Nov 14th 2008
    #

    Due to ongoing strangeness with apparently fully functional eAccelerator installations refusing to offer up the functions necessary for key caching, I’ve created a small test file – copy, pasta, save-as, whatever test.php somewhere on your server etc. etc. – that will show the availability of functions required for WP-SuperCache-Plus to work with storage engines other than Disk.

    It currently only works for eAccelerator and APC because I can’t find any documentation on what extension name to look for with Zend-Cache and I’m not up for guessing. Nobody uses it anyway, so who cares.

    Note that this is how PHP sees the extensions and if the necessary functions aren’t present then there’s naught that I can do.

    Here’s the aforementioned php file in phps format

    The output will look something like this example on my server. which should show (assuming that I haven’t changed anything since I wrote this) an eAccelerator API of 25 functions – 4 of which are necessary for the plugin to use it for storage.

    Note: This has nothing to do with whether the plugin as a whole will work or not – Disk storage is always available. It’s only about whether the APC or eAccelerator storage will be usable.


  45. Gene Steinberg

    Nov 14th 2008
    #

    OK, here’s mine. My php.ini file has a pretty standard eAccelerator config (much like the one someone else posted above:

    **** Testing apc extension ****

    apc extension not loaded
    Result: Plugin will NOT work using apc

    **** Testing eaccelerator extension ****

    eaccelerator API functions defined:
    Array
    (
    [0] => eaccelerator_caching
    [1] => eaccelerator_optimizer
    [2] => eaccelerator_clear
    [3] => eaccelerator_clean
    [4] => eaccelerator_info
    [5] => eaccelerator_purge
    [6] => eaccelerator_cached_scripts
    [7] => eaccelerator_removed_scripts
    [8] => eaccelerator_list_keys
    [9] => eaccelerator_encode
    [10] => eaccelerator_load
    [11] => _eaccelerator_loader_file
    [12] => _eaccelerator_loader_line
    )

    Testing availability of functions required by WP-SuperCache-Plus:

    function_exists(‘eaccelerator_put’) -> NO
    function_exists(‘eaccelerator_get’) -> NO
    function_exists(‘eaccelerator_rm’) -> NO
    function_exists(‘eaccelerator_list_keys’) -> YES

    Result: Plugin will NOT work using eaccelerator

    I hope it helps.

    Peace,
    Gene


  46. ovidiu

    Nov 14th 2008
    #

    same here:
    **** Testing apc extension ****

    apc extension not loaded
    Result: Plugin will NOT work using apc

    **** Testing eaccelerator extension ****

    eaccelerator API functions defined:
    Array
    (
    [0] => eaccelerator_caching
    [1] => eaccelerator_optimizer
    [2] => eaccelerator_clear
    [3] => eaccelerator_clean
    [4] => eaccelerator_info
    [5] => eaccelerator_purge
    [6] => eaccelerator_cached_scripts
    [7] => eaccelerator_removed_scripts
    [8] => eaccelerator_list_keys
    [9] => eaccelerator_encode
    [10] => eaccelerator_load
    [11] => _eaccelerator_loader_file
    [12] => _eaccelerator_loader_line
    )

    Testing availability of functions required by WP-SuperCache-Plus:

    function_exists(‘eaccelerator_put’) -> NO
    function_exists(‘eaccelerator_get’) -> NO
    function_exists(‘eaccelerator_rm’) -> NO
    function_exists(‘eaccelerator_list_keys’) -> YES

    Result: Plugin will NOT work using eaccelerator

    :-(


  47. ovidiu

    Nov 14th 2008
    #

    oh, and how am I supposed to understand this:

    Disk-Cache

    * Initialised: 2008-11-14 07:35
    * 3 total cached pages (average TTL: 0s)
    o 0 gzipped pages
    o 3 expired pages
    * Cache misses: Not implemented = 0%
    * Cache hits: Not implemented = 0%
    * Cache 304s: Not implemented = 0%

    WP-Super-Cache

    * 5 files in cache (0 expired)

    what does Not implemented = 0% mean?


  48. Murmatron Server Admin
    Admin Avatar
    Nov 14th 2008
    #

    OK, I’ve trawled though the eAccelerator source code and the difference between the functions I have available from eAccelerator and what you guys have posted corresponds exactly to eAccelerator being built without the following disabled-by-default options…

    --with-eaccelerator-shared-memory (required by plugin)
    --with-eaccelerator-sessions 
    --with-eaccelerator-content-caching

    I’m thinking that this is not a coincidence.

    As for the ‘Not Implemented’ stats; The Disk based storage doesn’t keep track of those stats since it would require a file open, file read, file write operation for every single page view. I was of the opinion that this constituted an unacceptable amount of entirely avoidable disk activity. As I understand it, one of the reasons that the file based object-cache was dropped out of WordPress a while back was that the amount of disk activity generated was really pissing off some hosting companies, so I’ve always paid heed to minimising avoidable disk activity when developing this plugin – thus; no stats for disk.

    Implementing the (work-in-progress) memcached storage means I’m going to have to add the facilty for a storage engine to have its own settings section on the admin-page, so the stats for disk thing could become a switchable option at some point in the future.


  49. ovidiu

    Nov 14th 2008
    #

    thx a million :-) I am going to rebuild eaccelerator with those settings after work today and try your plugin again. Thx for the other clarifications as well.


  50. Gene Steinberg

    Nov 14th 2008
    #

    OK, so we have a situation here where the default method of building eAccelerator, courtesy of cPanel’s EasyApache feature, is omitting certain features. That presents a difficult issue for many, since that’s the way it’ll frequently be set up. This presents a questionable situation.

    Peace,
    Gene


  51. Ovidiu

    Nov 14th 2008
    #

    I am not using some cpanel isntall but the default instructions on their site: http://eaccelerator.net/wiki/InstallFromSource

    this is how I did it now:

    phpize
    ./configure –with-eaccelerator-shared-memory –with-eaccelerator-sessions –with-eaccelerator-content-caching
    make
    make install
    /etc/init.d/apache2 restart

    here is my /etc/php5/apache2/php.ini

    extension=”eaccelerator.so”
    eaccelerator.shm_size=”32″
    eaccelerator.cache_dir=”/var/cache/eaccelerator”
    eaccelerator.enable=”1″
    eaccelerator.optimizer=”1″
    eaccelerator.check_mtime=”1″
    eaccelerator.debug=”0″
    eaccelerator.filter=”!*rotate.php !*PEAR.php”
    eaccelerator.shm_max=”0″
    eaccelerator.shm_ttl=”3600″
    eaccelerator.shm_prune_period=”3600″
    eaccelerator.shm_only=”0″
    eaccelerator.compress=”1″
    eaccelerator.compress_level=”9″
    eaccelerator.allowed_admin_path=”/var/www/web1/web/eaccelerator.php”

    STILL DOESN’T work, wp super cache only offers me DISK as storage method :-(


  52. Murmatron Server Admin
    Admin Avatar
    Nov 14th 2008
    #

    Aaaarrrrrrrrrrggghhhhhh!


  53. Ovidiu

    Nov 14th 2008
    #

    hehe :-) I guess I deserved that for whining around here :-( still, any ideas? did I do something wrong when compiling?


  54. Ovidiu

    Nov 14th 2008
    #

    fixed it :-)

    Until now I just went into the eaccelerator-0.9.5.3 directory, and recompiled like I stated above, but now, after erasing the directory and redoing it all, it works :-) I can select eaccelerator in the backend and it works :-)


  55. Murmatron Server Admin
    Admin Avatar
    Nov 14th 2008
    #

    Excellent – I’m glad that you got it working and I don’t have to go insane :\

    Keep an eye on memory usage so that the cached keys don’t cause compiled scripts to be forced out of memory.

    I’m going to add a note about the compile options to the article.


  56. Murmatron Server Admin
    Admin Avatar
    Nov 15th 2008
    #

    Released Version 0.6.8

    Minor changes and fixes.


  57. ovidiu

    Nov 18th 2008
    #

    a small issue with 0.6.8 or maybe its not the plugins fault?

    tried to delete a user, was asked what to do with that users posts/commetns, selected move to admin, then pressed delete and got this error:

    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '}' at line 1]
    UPDATE wpwp_links SET link_owner = 1 WHERE link_owner = 10}

    Warning: Cannot modify header information - headers already sent by (output started at /var/www/web80/web/wp-includes/wp-db.php:517) in /var/www/web80/web/wp-content/plugins/wp-supercache-plus/wp-cache-base.php on line 161


  58. ovidiu

    Nov 18th 2008
    #

    oh, and the user got deleted properly.


  59. Murmatron Server Admin
    Admin Avatar
    Nov 18th 2008
    #

    I’ve removed the pluggable wp_redirect function from wp-cache-base.php

    When I was working on handling internal WordPress redirects, I thought that I would need to modify that function, but in the end I didn’t.

    Since that function was overriding WordPress’ wp_redirect with an identical copy, the headers already sent Warning on user delete may just just move there.

    Anyway, I’ve released Version 0.6.8.5


  60. Murmatron Server Admin
    Admin Avatar
    Nov 21st 2008
    #

    Released Version 0.6.9

    Requests that generate a SuperCache entry (anonymous users) no longer also generate an identical WP-Cache entry that will never be used for anything other than wasting shared memory or disk space.


  61. ovidiu

    Nov 21st 2008
    #

    I know you said that you didn’t check wpmu compatibility, but here is what the wp-super-cache readme says:

    4. If you are using WordPress MU you will need to install this in ‘wp-content/mu-plugins/wp-super-cache/’ and the file wp-cache.php must be copied into the mu-plugins directory.

    is this also true with wp-super-cache-plus? I’d be happy to give it a try, just wanted to confirm with you first if that has a chance to work…


  62. Murmatron Server Admin
    Admin Avatar
    Nov 21st 2008
    #

    ovidiu

    I honestly don’t know. I’ve never tried MU (I suppose I should).

    It is possible that I’ve changed something that might be a problem on MU, but I think that if anything it would be something file path related (maybe includes not working) rather than the actual cache functionality.

    There’s nothing that I’ve done on purpose that should make those instructions invalid.

    I’m going away for the weekend now, but I’m adding MU to the list of things I need to test – unless you want to test it first ;)


  63. Murmatron Server Admin
    Admin Avatar
    Nov 25th 2008
    #

    Released Version 0.7

    Added XCache storage.


  64. Murmatron Server Admin
    Admin Avatar
    Nov 27th 2008
    #

    Released Version 0.7.1

    Fixed a problem with‘Directly Cached Files’.

    Added XCache checking and actual PUT/GET/DELETE test to test.php.


  65. ovidiu

    Nov 28th 2008
    #

    it seems its no longer 100% compatible with wpmu. wpmu installation requires it to be installed into mu-plugins instead of plugins folder. seems you changes some references. could you maybe try and get it wpmu compatible again? or shall I go an change it manually and the nevery time you update?

    some errors as an example: Warning: include_once(/var/www/web5/web/wp-content/plugins/wp-supercache-plus/storage/disk.php) [function.include-once]: failed to open stream: No such file or directory in /var/www/web5/web/wp-content/mu-plugins/wp-cache.php on line 67

    besides, donncha says this is how to install it into wpmu: the wp-super-cache readme says: 4. If you are using WordPress MU you will need to install this in ‘wp-content/mu-plugins/wp-super-cache/’ and the file wp-cache.php must be copied into the mu-plugins directory.


  66. Murmatron Server Admin
    Admin Avatar
    Nov 28th 2008
    #

    EDIT: Nooooooo!!1! This is wrong. I spoke too soon – I need to look at this in more detail. Removing the define from the config file causes problems.

    Ovidiu,

    Thanks for that – I haven’t had time to look at WPMU yet.

    On the basis of what you posted, there’s one very obvious thing that isn’t MU compatible…

    I’ve hard-coded /plugins/... in the define near the bottom of .../wp-content/wpscplus-config.php (and wpscplus-config-sample.php).

    define('WPSCP_HOME_DIR', WP_CONTENT_DIR.'/plugins/wp-supercache-plus/' );

    Having that define in the config file is one difference between this and Donncha’s SuperCache and without trawling my SVN logs I’ve no recollection of when and why I put it in there.

    I’ve just tested with that line removed and everything seems to activate and function just fine. Without it, the value of that constant is assigned differently and should be WPMU compatible.

    That line in the config file is at least part of the problem and needs to go.

    EDIT2: Now I remember why I did that – dirname(__FILE__) in ...wp-content/advanced-cache.php returns the wp-content directory rather than the plugin’s installed directory on Windows servers because advanced-cache.php is not a symlink.


  67. ovidiu

    Nov 28th 2008
    #

    shall I change that to read define(‘WPSCP_HOME_DIR’, WP_CONTENT_DIR.’/mu-plugins/wp-supercache-plus/’ ); or just delete it? can you accomodate that in future versions maybe?


  68. Murmatron Server Admin
    Admin Avatar
    Nov 28th 2008
    #

    Changing it should be fine.

    Removing it should be fine on a Unix/Linux box, but it screws up horribly on Windows servers (like mine).

    This problem has its origins in the fact that advanced-cache.php is probably a symlink under Unix/Linux and definitely isn’t a symlink under Windows.

    I’m pondering on the best way to sort this issue once and for all – what seems to be the most sensible is to make advanced-cache.php a real file (on all platforms) that does nothing but include the phase1 file. That does away with the maybe it’s a symlink, maybe it’s not problem.

    That’s how I’ve always set up SuperCache on Windows servers anyway.

    The next release will have this sorted.


  69. Murmatron Server Admin
    Admin Avatar
    Nov 28th 2008
    #

    Released Version 0.7.2

    Fixed a problem with the WPSCP_HOME_DIR define that didn’t work with WPMU.


  70. Ovidiu

    Nov 29th 2008
    #

    thx. seems to be working fine :-)


  71. ovidiu

    Dec 2nd 2008
    #

    I’ve got a huge problem :-( I didn’t notice that after I told your plugin not to cache pages for logged in users, I got a conflict with who sees ads plugin :-(

    Warning: preg_match() [function.preg-match]: Compilation failed: nothing to repeat at offset 0 in /var/www/web5/web/wp-content/mu-plugins/wp-supercache-plus/wp-cache-phase2.php on line 168

    Warning: preg_match() [function.preg-match]: Compilation failed: nothing to repeat at offset 0 in /var/www/web5/web/wp-content/mu-plugins/wp-supercache-plus/wp-cache-phase2.php on line 168

    Warning: Cannot modify header information – headers already sent by (output started at /var/www/web5/web/wp-content/mu-plugins/wp-supercache-plus/wp-cache-phase2.php:168) in /var/www/web5/web/wp-content/mu-plugins/wp-supercache-plus/wp-cache-phase2.php on line 93

    Warning: Cannot modify header information – headers already sent by (output started at /var/www/web5/web/wp-content/mu-plugins/wp-supercache-plus/wp-cache-phase2.php:168) in /var/www/web5/web/wp-content/mu-plugins/wp-supercache-plus/wp-cache-phase2.php on line 95

    Warning: Cannot modify header information – headers already sent by (output started at /var/www/web5/web/wp-content/mu-plugins/wp-supercache-plus/wp-cache-phase2.php:168) in /var/www/web5/web/wp-content/mu-plugins/wp-supercache-plus/wp-cache-phase2.php on line 96

    Warning: Cannot modify header information – headers already sent by (output started at /var/www/web5/web/wp-content/mu-plugins/wp-supercache-plus/wp-cache-phase2.php:168) in /var/www/web5/web/wp-content/mu-plugins/wp_ozh_whoseesads.php on line 632

    Warning: Cannot modify header information – headers already sent by (output started at /var/www/web5/web/wp-content/mu-plugins/wp-supercache-plus/wp-cache-phase2.php:168) in /var/www/web5/web/wp-content/mu-plugins/wp_ozh_whoseesads.php on line 633

    these errors are all over :-( you can check it here: http://zice.ro – any ideas?


  72. Murmatron Server Admin
    Admin Avatar
    Dec 2nd 2008
    #

    ovidiu,

    I installed ‘Who Sees Ads’ and messed around with combinations of settings, but I can’t replicate that.

    What’s in your SuperCache ‘Rejected URIs’ box?

    Can you try suppressing the warning by changing line 168…

    if( preg_match(...

    … in wp-cache-phase2.php to …

    if( @preg_match(...

    … and see if the Headers Already Sent warnings are still there.


  73. ovidiu

    Dec 2nd 2008
    #

    oh, I see, me rejected urls are:
    /trackback
    wp-.*.php
    index.php
    ?action=
    ?topic=

    I inserted the latest 2 by this advice: http://premium.wpmudev.org/forums/topic.php?id=553 took those two lines out and all is good now :-) sorry for bothering you…


  74. Murmatron Server Admin
    Admin Avatar
    Dec 2nd 2008
    #

    If you escape those question marks there will be no problem.

    \?action=
    \?topic=

  75. ovidiu

    Dec 2nd 2008
    #

    thx but does not really work on my side, I anter the escaped strings, after saving they look like: \\?action=
    \\?topic= and thats wrong :-(


  76. Murmatron Server Admin
    Admin Avatar
    Dec 2nd 2008
    #

    Now that’s really weird – I can escape them no problems.


  77. ovidiu

    Dec 2nd 2008
    #

    :-( I put in \?action=
    \?topic= save and what gets saved is \\?action=
    \\?topic= anyway, its not that important :-) a more pressing matter woudl be how do you format your comments, mine always look awful here :-( and I’d like to make it easier for you to follow…


  78. Murmatron Server Admin
    Admin Avatar
    Dec 2nd 2008
    #

    I just type my comments as valid XHTML 1.0 Strict so I don’t have to guess what WordPress will make it look like – It’s a bad habit that I’ve picked up over the years :-) and I can’t rightly claim in the footer that the page validates and set about breaking it deliberately.

    The biggest difference between what I do and what WordPress converts your comments to anyway is that I use the <pre lang="whatever"> (WP-Syntax plugin) and <tt> tags a lot.

    e.g.

    <pre lang="text">\?action=
    \?topic=</pre>
    gives you

    \?action=
    \?topic=

    To be honest, I can follow your comments just fine. There was an issue until a couple of days ago where I had the WordPress automatic comment formatting disabled. Unfortunately, now that I’ve turned it back on this page no longer validates and all the errors are caused by WordPress ‘fixing’ the comments. I think that WP 2.7 is better in that respect, but this site is still 2.6.5


  79. ovidiu

    Dec 2nd 2008
    #

    :-) my mistake, that question was on my head for a long while, I had not even noticed my comments look just fine now :-) a couple of days ago, all was just a big pile of characters, no spaces, no new lines, nothing. sorry for the pointless question ;-(


  80. Murmatron Server Admin
    Admin Avatar
    Dec 3rd 2008
    #

    Released Version 0.7.3

    Fixed a problem where using the No-Cache for Registered Users plugin would prevent SuperCache expiry.


  81. ovidiu

    Dec 3rd 2008
    #

    does any of these upgrades require to change the .htaccess rules? usually I just upgrade the plugin and that is it. will you maybe point it out if the .htaccess rules have changed when a new version comes out or will they never change.


  82. Murmatron Server Admin
    Admin Avatar
    Dec 3rd 2008
    #

    The .htaccess rules haven’t changed in ages and I don’t think that anything that I have planned will require any changes.

    I’d certainly flag it up if they did need changing.


  83. [...] plugin interesante es una modificación de WP-SuperCache para que en lugar de guardar las páginas en el disco, lo haga en la memoria del acelerador. [...]


  84. Murmatron Server Admin
    Admin Avatar
    Dec 15th 2008
    #

    Released Version 0.7.4

    Added Memcached storage engine.


  85. Murmatron Server Admin
    Admin Avatar
    Dec 18th 2008
    #

    Released Version 0.7.5

    Added Memcached-Alt (alternative cache purge method) storage engine.


  86. Murmatron Server Admin
    Admin Avatar
    Dec 18th 2008
    #

    Bumped 0.7.5 up to Version 0.7.5.1

    Improved Memcached-Alt cache flushing.


  87. Prasannah

    Dec 27th 2008
    #

    I had been using this plugin on my website and it was working really well. Recently I requested my host to switch my site from PHP 4 to PHP 5. Ever since then, I’m not sure if its working or not. Can you check out my site and help me? (I switched on the option to add the ‘Digg-proof’ message to my footer but I don’t see it!)


  88. Murmatron Server Admin
    Admin Avatar
    Dec 27th 2008
    #

    Prasannah,

    It’s good to know that it worked on PHP4 – that’s something that I was never 100% sure of. There should be no problems with PHP5.

    I looks fine to me – I can see the footer although there are some pages coming from the SuperCache that don’t have it.

    Switching the footer message on/off doesn’t clear the cache, so the change won’t appear on pages that are already cached until they have expired (or until you delete the cache).

    The easiest way to see if everything is working as expected is to look at the response headers that come with the page using something like Firebug. The plugin inserts X-WPSCP headers that tell you where the page is coming from – Dynamic, Cache or SuperCache.


  89. ovidiu

    Jan 14th 2009
    #

    just wanted to bring another plugin to your attention: http://wordpress.org/extend/plugins/db-cache/ claims to be better than wp super cache, maybe you can have a look and confirm or otherwise use some of its mechanism for your plugin?


  90. ovidiu

    Jan 14th 2009
    #

    oh, and by the way, the plugin seems to be a little better explained on its own page.


  91. Murmatron Server Admin
    Admin Avatar
    Jan 14th 2009
    #

    ovidiu,

    Thanks for that – downloaded and I’ll take a look. I’m off to visit family for a few days so I’ll need something to keep me sane :\

    My first thought from reading about it is that while caching queries may be very nice, a significant (sometimes huge) proportion of the render time on many blogs is spent in plugins doing preg_replace or similar on the content and/or comments. – Query caching won’t do much for that.

    This post is a good example – It runs 32 queries like pretty much every other post does, but takes 5 times longer to render than most of them because of the large number (for this site) of comments.

    Having said that, I haven’t looked at it yet so I’ll reserve judgement.


  92. ovidiu

    Jan 27th 2009
    #

    another thing for you to have a look at: http://wordpress.org/extend/plugins/wp-widget-cache/

    they claim its a nice addition to wp super cache – is it? anyway, I’d love to hear your opinion on this.


  93. Murmatron Server Admin
    Admin Avatar
    Jan 27th 2009
    #

    The widget-cache is based on exactly the same reasoning that I’m following…

    Caching at the highest possible level gives the biggest benefits and caching the hierarchy of components that got you there minimizes the amount of work that needs to be done when something changes.

    Widgets, just like plugins, can have a huge effect on page generation time – many use a remote API that makes your site’s load time dependent on someone elses servers, some are quite complicated, while others are just horribly coded. You might even get lucky and find some that are all of those. Caching the output of the little fuckers is definitely the best thing next to not using them.

    My only beef with it is that it caches to disk. I’d rewrite it before using it.


  94. Ovidiu

    Jan 27th 2009
    #

    are you or rather will you be following the path the original wp super cache is leading or are you rather aiming at forking away from the original? I am just curious :-) no other reason for asking. btw. just noticed donncha updated to 0.9 which proimises to halve the number of cached pages….


  95. Murmatron Server Admin
    Admin Avatar
    Jan 27th 2009
    #

    As far as following or forking goes, I’m just doin’ my own thing but if I see any good ideas from anywhere that makes it better I’ll give it a go. I’ve tried to keep compatibility, but really only in terms of the plugins and hooks.

    Once I’ve finished the the page fragment caching that I’m working on now, I want to try and remove the whole Apache-centric thing and support other servers better – nginx being top of my list. Beyond that I have no idea where I’m going with it.

    just noticed donncha updated to 0.9 which proimises to halve the number of cached pages

    Based on a quick skim over the code in trunk, I think I fixed that one a couple of months ago.


  96. ovidiu

    Jan 28th 2009
    #

    had to reinstall the plugin on my wpmu site and getting some weird errors now:

    on your first visit on any page but the homepage I get: Warning: Cannot modify header information – headers already sent by (output started at /var/www/web5/web/wp-includes/functions.php:2523) in /var/www/web5/web/wp-content/mu-plugins/wp-supercache-plus/wp-cache-phase2.php on line 653

    after doing a shift-refresh there is only a warning: site loaded with errors: Syntax Error

    This is with IE6 latest built.

    the site: http://zice.ro

    could you give it a quick test maybe?


  97. ovidiu

    Jan 28th 2009
    #

    oh, and when logged out with Firefox I get this on the homepage (after the footer):



    Warning: Cannot modify header information – headers already sent by (output started at /var/www/web5/web/wp-includes/functions.php:2523) in /var/www/web5/web/wp-content/mu-plugins/wp-supercache-plus/wp-cache-phase2.php on line 653

    btw. have updated to wpmu 2.7 beta a couple of days ago…


  98. Murmatron Server Admin
    Admin Avatar
    Jan 28th 2009
    #

    Released Version 0.7.5.2

    This should fix the headers already sent warning.

    The output buffer ‘fix’ for PHP-Speedy seems to be a non-starter. I’ll need to look more closely at how to fix it properly.

    Retracted


  99. ovidiu

    Jan 28th 2009
    #

    didn’t help me :-( – sorry


  100. ovidiu

    Jan 28th 2009
    #

    and I am not using php speedy on this site, just as an info for you.


  101. Murmatron Server Admin
    Admin Avatar
    Jan 28th 2009
    #

    My new theory is that it’s a plugin doing it.

    Try commenting out the flush(); at wp-cache-phase2.php line 675


  102. Ovidiu

    Jan 28th 2009
    #

    completely weird. i commented that line out by putting // in front of it and when first visiting any page/post I stil get the same error. If I refresh, the error disappears but I get an IE error, saying somethign about: sintax error, go try for yourself, i.e. http://zice.ro/publicitate/ or any other page except the homepage


  103. Murmatron Server Admin
    Admin Avatar
    Jan 28th 2009
    #

    Yes, I get the same error with IE and see the warning, but I’m not 100% convinced that the two problems are related.

    The IE error looks like what you get if the content is gzipped twice. Since the problem is when you F5 and get the SuperCached static file, it suggests to me that mod_deflate is gzipping the SuperCache .gz files. If you have mod_deflate active, try turning off the SuperCache compression option to see what happens. If that fixes the IE problem, check that the .htaccess in the wp-content/cache directory has the following in it…

    <IfModule mod_mime.c>
      AddEncoding gzip .gz
      AddType text/html .gz
    </IfModule>
    <IfModule mod_deflate.c>
      SetEnvIfNoCase Request_URI \.gz$ no-gzip
    </IfModule>

    That’s supposed to prevent mod_deflate from gzipping the already gzipped files.

    The warning disappears when you F5 because it doesn’t get cached – it’s happening after SuperCache’s shutdown callback. That’s what makes me think that some plugin has registered a shutdown callback and for some reason is trying to send headers after the content has already gone.

    Can you search the .php files your plugins directory for the string shutdown


  104. ovidiu

    Jan 29th 2009
    #

    hmm… dunno what to say:

    mod_deflate is active, thats why the super cache compression wasn’t enabled in the first place.
    the .htaccess inside the cache folder does have the mentioned directives in :-(

    unfortunately I can’t search for the shutdown string now, will have to do so later on from home :-(


  105. Lincoln

    Jan 30th 2009
    #

    I just installed the plugin with eAccelerator enabled. I’ve been surfing around my WordPress site to get some cache files built and so far see these numbers:

    * Initialised: 2009-01-30 16:07
    * 0 total cached pages
    o 0 gzipped pages
    o 0 expired pages
    * Cache misses: 107 = 89%
    * Cache hits: 3 = 2%
    * Cache 304s: 9 = 7%

    Super-Cache

    * 182 files in cache (0 expired)

    Are cache misses supposed to be that high, at least at first? Seems odd that with over 182 cache files generated, it would only hit on 3 of them.


  106. Murmatron Server Admin
    Admin Avatar
    Jan 30th 2009
    #

    Are cache misses supposed to be that high, at least at first? Seems odd that with over 182 cache files generated, it would only hit on 3 of them.

    At the risk of being patronising, I’ll start by pointing out that there are two caches. Cache and SuperCache. Maybe you know that, maybe not. No offense intended.

    Misses will often be high at first since each new page being cached is a Miss.

    The 182 static Super-Cache files (that’s files, not pages) are being generated by anonymous (no cookies set / not logged-in) requests and are only served to anonymous users. They don’t figure in the Hits, Misses & 304 statistics. Those stats only apply to cookied / logged-in requests.

    With Super-Cache enabled, I’d expect to see 304s being higher than Hits.

    With Super-Cache disabled (Half-On mode) everything goes into the same Cache so now the Hits/304 ratio will depend on the ratio of registered/anonymous.

    Also – keep an eye on eAccelerator memory usage as you don’t get any warnings when it fills up.


  107. Lincoln

    Jan 31st 2009
    #

    I’m an idiot when it comes to these things, so patronize away. =D

    I never really understood how super cache operated as opposed to the plain old wp-cache, so thanks for clarifying a few things. I just wanted to make sure the eAccelerator was being used properly, since I had to have it rebuilt to include all the required functions. Since nothing is exploding I’m going to assume it’s working as it should be.

    Thanks for your help!


  108. ovidiu

    Feb 3rd 2009
    #

    I still have the same problems :-( I did a grep -R -i ’shutdown’ web/ > test.txt and here is the link to the file: http://rapidshare.com/files/193227310/test.txt.html does anythign there strikes you as problematic? which plugin should I try disableing? Please give me some advise.


  109. Murmatron Server Admin
    Admin Avatar
    Feb 3rd 2009
    #

    I’ve looked at the list of plugins and there isn’t much to go on.

    I’m a bit lost on this one – There’s a <br /> tag at the end of your html after the </html> tag whenever the warning is visible, so something is definitely sending content after SuperCache has got everything and cached it.

    Here’s a replacement wp-cache-phase2.php that will log what’s going on with the output buffers to wp-content/wpscp-debug.log. I’m hoping that it might reveal an output buffer above SuperCache and give us a callback function name that we can track down. If not, I’ll have to put my thinking hat on again.

    The output will look something like..

    2009-02-03 10:13:41 T+2110 - Buffer flushed: wpscp_ob_callback
    2009-02-03 10:13:41 T+2112 - Buffer remaining: default output handler

    Fingers crossed :\


  110. Ovidiu

    Feb 3rd 2009
    #

    hi tehre :-)
    thx a lot. the file is in place, now I’ll go click around, you can do the same, will get back here with the log file…


  111. Ovidiu

    Feb 3rd 2009
    #

    :-(
    2009-02-03 14:26:38 T+12903 -
    2009-02-03 14:26:38 T+12904 -
    2009-02-03 14:28:04 T+0192 -
    2009-02-03 14:28:04 T+0192 -
    2009-02-03 14:28:04 T+0138 -
    2009-02-03 14:28:04 T+0138 -


  112. Ovidiu

    Feb 3rd 2009
    #

    nothing to be seen after the “T+12903 -” parts – the code above is not missing anything, that is all there is in teh log file.


  113. Murmatron Server Admin
    Admin Avatar
    Feb 3rd 2009
    #

    Fuck! Now that’s a mystery.

    If it weren’t for the weird IE error which may be related, I’d say “fuck it” and just set

    display_errors = Off

    in php.ini and forget about it.

    Donncha has been having some interesting shutdown/buffer related fun lately in this WP forums topic and has shuffled some stuff around to try and solve it. I’m about to take a look at what he’s done.

    But first, here’s a zip with a new phase1 & phase2 for you to try where I’ve shifted the start of output buffering as early as is possible in the process. Let’s see what happens with that.

    wp-supercache-plus_obstart_test.zip

    It’s a bummer – if this crap was happening on my own server I could probably track it down very quickly.

    Out of curiousity; have you tried Donncha’s SuperCache to see if it does the same thing?


  114. Ovidiu

    Feb 3rd 2009
    #

    hey, thx for helping out.
    1. used the 2 new files, will past the log file further down here after a few minutes of browsing
    2. nothing, the log file looks the same :-( just more entries :-(
    3. maybe a related problem: I have some mysql problems, around 17% of failed connection attempts
    4. will be offline tomorrow, its my birthday and I am being invited onto a mystery tour :-) will get back to you on THursady.
    5. maybe I can arrange ssh access for you to the server if everythign else fails

    thx, ovidiu


  115. Ovidiu

    Feb 5th 2009
    #

    just tried donncha’s version, its active at the moment on zice.ro and it seems not to give this error :-( I completely deleted your version and replaced with donncha’s.

    Please let me know what to do from here.


  116. Murmatron Server Admin
    Admin Avatar
    Feb 5th 2009
    #

    I’d recommend going with whatever works.

    I’m in the middle of a major rewrite of the supercache garbage collection and purging at the moment and it’s probably going to be a few weeks before that’s ready for release.

    What Donncha did a few days ago seems to make sense and it’s quite possible that it’s what’s making the difference on your site. I have a couple of reservations about it though and want to test some variations before I jump in and implement the same thing in mine.


  117. Ovidiu

    Feb 5th 2009
    #

    k, I’ll keep an eye on your version though. don’t really *need* caching right now, but one never knows…


  118. conny

    Feb 16th 2009
    #

    Got exactly the same error as Ovidiu:

    Warning: Cannot modify header information – headers already sent in /var/www/little-gamers.com/wp-content/plugins/wp-supercache-plus/wp-cache-phase2.php on line 653

    I’ll need to revert to the original Super Cache as well since this screws up all the feeds on the site.


  119. Murmatron Server Admin
    Admin Avatar
    Feb 17th 2009
    #

    In a way, that’s good – It isn’t just Ovidiu that has the problem. There’s something going on that needs fixing.

    Unfortunately, I’m not sure what it is. I’ve already (in my dev version) moved the start of output buffering much earlier, but I don’t get that error so I don’t know if it will do any good.

    What gets screwed up in the feeds? This plugin caches the feeds whereas (I think) the original doesn’t. My feeds work fine cached but I guess it may make sense to make it a switchable option.


  120. Ayalon

    Feb 22nd 2009
    #

    Great plugin. Only i found a bug.

    Wordpress is sending by default 301 redirects on pages, which is the correct way to handle redirects inside wordpress. But this plugin is changing 301 to 302’s, is there a special reason for it and how can i disable?

    Regards


  121. Murmatron Server Admin
    Admin Avatar
    Feb 22nd 2009
    #

    I’m hooking wp_redirect so that I can detect redirects and avoid caching them.

    I’m not changing anything on purpose, but it could well be because I’ve left out a return in the callback.

    Try adding …

    	return $status;

    at the end of the wpscp_redirect_callback function @ line 836 of wp-cache-phase2.php

    That’s the only interaction with redirects in the plugin – detect and ignore.

    Hope that sorts it.


  122. richard

    Mar 3rd 2009
    #

    Is Memcached WordPress faster than WordPress + eAccerelator?

    I tried Memcached on one of my wordpress and it seems to run extremely less queries (about 5) compared to WordPress + eAccerator (about 20 queries)..

    However I only managed to get it work on ONE wordpress. I have problem getting it to work on the second wordpress ( I am NOT using WordPress MU). Is there any way to make it work on another wordpress blog on the same server?

    I tried this WP-SuperCache Plus, but test.php tells me eAccerelator can NOT work.

    **** Testing eaccelerator extension ****
    eaccelerator extension not loaded
    Result: Plugin can NOT work using eaccelerator

    Does this mean eAccelerator is not working at all?

    Looks like I might have to recompile eAcceralator with –with-eaccelerator-shared-memory.


  123. Murmatron Server Admin
    Admin Avatar
    Mar 3rd 2009
    #

    With a single server, caching to memcached will probably be slower than caching to eAccelerator due to the protocol overhead. Memcache can however use multiple servers and allow for multiple web-servers sharing the cache. eAccelerator can’t really do this, so for huge sites memcache is much better.

    If you’re referring to Ryan Boren’s memcached object-cache for WordPress not working on multiple blogs, I suspect that it may not be written to support that scenario. All the storage engines in my SuperCache plugin support multiple domains on the same server, as does my eAccelerator object-cache.

    There’s nothing to stop you using eAccelerator (or some other op-code cache) and memcache at the same time. eAccelerator stores the compiled scripts making the scripts run faster and memcache is used for caching content.

    It does seem like your eAccelerator is not loaded at all. That test is just reporting back what PHP knows about the extension.


  124. richard

    Mar 3rd 2009
    #

    I have recompiled eAccelerator with the –with-eaccelerator-shared-memory option.

    test.php still show the same thing even after refresh serveral times, but the SuperCache Plus Plugin now allows me to use eAccelerator beside Disk, Memcached and Memcached-Alt.

    Yes I am using Ruan Boren’s Memcached Object Cache for Wordpress for one of my blog (testing purpose) which seem to be written for WPMU.


  125. Murmatron Server Admin
    Admin Avatar
    Mar 3rd 2009
    #

    Interesting.

    The test.php came about because some people were having problems with eAccelerator being loaded and apparently functional, but not available as an option in SuperCache-Plus.

    If it’s available in the drop-down then it will probably work – don’t worry what test.php says. I’m not really sure what’s going on with that but I’ll have a look-see and try to figure it out.


  126. richard

    Mar 3rd 2009
    #

    It seems that eAccerelator is working so well that /tmp get 100$ fill up.

    Images do not seems to load on website till something are deleted from the /tmp directory.

    Should I change the /tmp/eaccerelator to /root/tmp/eaccerelator or something else?


  127. Murmatron Server Admin
    Admin Avatar
    Mar 3rd 2009
    #

    I doubt that the web server process could write to /root/tmp and I doubt that making it so it can would be a wise thing to do.

    Is there a quota in place on /tmp that could be increased?

    I’m somewhat reluctant to make judgement calls on how anyone’s server is or should be configured – it’s over 2 years since I quit my job as a sysadmin and have hardly touched a lunix machine since then, so I’ve forgotten more than I care to remember. I don’t want to give any bad advice.

    Personally, I have eAccelerator configured to never lay down disk files ( eaccelerator.shm_only ), but in that case you absolutely need to have enough RAM allocated to it to make sure it never overflows otherwise the whole thing is pointless.


  128. richard

    Mar 3rd 2009
    #

    Now I have a big problem.

    As my .server /tmp directory is full, it seems to break almost all my wordpress blog.

    Images are not appearing on the gallery, however when manually call up, the images do appear..

    Didi a hard reset, still the same. Any idea what happen?


  129. Murmatron Server Admin
    Admin Avatar
    Mar 4th 2009
    #

    I’m guessing the gallery creates files in /tmp when creating thumbnails so when there’s no room it fails.

    Having no idea how much space is available in /tmp, what it’s full of or why it’s limited to to what it is, I can only suggest looking at ways to either clear it out with a cron job or not fill it up in the first place.


  130. richard

    Mar 5th 2009
    #

    my /tmp is 996M, less than 1 GB. I have changed it to /home/tmp/eAccerelator.

    However i have temporary disabled eAccerelator at this moment as it is casuing instability to my server.


  131. Guy

    Apr 9th 2009
    #

    Thanks for your hard work on this plugin. It is working well on my Dreamhost PS. Unfortunately on my other VPS server it gives the following error:

    Warning: Division by zero in …/wp-content/plugins/wp-supercache-plus/storage/xcache.php on line 315

    I just installed xcache on my ubuntu server using aptitude and set the recommended memory values- it seems to be working; the xcache section of my phpinfo() reads as follows:

    XCache
    XCache Support enabled
    Version 1.2.1
    Modules Built cacher
    Readonly Protection N/A
    Opcode Cache enabled, 67,108,864 bytes, 1 split(s), with 8192 slots each
    Variable Cache enabled, 10,485,760 bytes, 1 split(s), with 8192 slots each
    Shared Memory Schemes malloc, mmap

    Which seems to my novice eyes to be ok.

    Any suggestions on what I can do to get the plugin going?

    Thanks :)


  132. Murmatron Server Admin
    Admin Avatar
    Apr 9th 2009
    #

    Guy,

    Firstly, congratulations on having the sense of adventure to try the SVN version.

    On its own, that Division by zero warning isn’t really anything to be concerned about. It’s where the plugin attempts to calculate the cache request rate when the cache hasn’t actually been used yet (it has just been created or cleared). It’s something that will be cleaned up before the next main release, but has no effect on functionality at all.

    If, however, you’re getting that warning repeated on every request and the Stats in the Cache Contents section of the plugin admin page never get away from zero, then something isn’t right.

    Are you getting any meaningful cache stats on the admin page?

    I can’t really comment much on what XCache settings are best or which won’t work. I test the plugin using XCache’s default settings (on a Windows server) and it works, but I don’t actually use XCache on any production servers so I’ve never really had any compelling reason to play with the settings.


  133. Guy

    Apr 11th 2009
    #

    Thanks for the reply. I have moved away from the SVN version now to the stable 0.7.5.1 version but now I can’t even activate the plugin because it gives the following error:

    Fatal error: xcache_list() [function.xcache-list]: xcache.admin.user and xcache.admin.pass is required in [server address ..]/wp-content/plugins/wp-supercache-plus/storage/xcache.php on line 176

    I have turned off the admin option in my xcache.ini because I’ve got enough on my plate already without trying to get that going as well but it seems that maybe the plugin needs this turned on?


  134. Murmatron Server Admin
    Admin Avatar
    Apr 12th 2009
    #

    That’s something I didn’t even notice. Or perhaps I did, at the time, and then forgot about it.

    xcache_list is an admin function and requires the php.ini setting xcache.admin.enable_auth = Off. That setting would be a bad idea on shared hosting but isn’t a problem on a private server (virtual or otherwise).

    For now that’s the solution and it appears to be a requirement for some other cache projects that use XCache. I’ll look into it in more detail.


  135. Ono Oogami

    Apr 14th 2009
    #

    Hello,. There is something wrong when I using this plugin.

    I am using Dreamhost and have complied eAcclerator (0.9.5.3) and add it’s setting to php.ini, which I can see in phpinfo .But After I installed your plugin , There is only a “Disk” Option in “WP-Cache Storage Engine” Setting. What’s wrong? I am sure I complied eacclerator with the –with-eaccelerator-shared-memory option.

    Removed link to phpinfo: I don’t think having it publicly available is a great idea.

    Can anyone help me ?
    THX ..


  136. Murmatron Server Admin
    Admin Avatar
    Apr 14th 2009
    #

    I looked at your phpinfo and don’t see any evidence of eAccelerator being loaded.

    Yours:

    Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
        with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
        with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies

    Mine:

    Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
        with eAccelerator v0.9.5.3, Copyright (c) 2004-2006 eAccelerator, by eAccelerator

    It’s certainly documented that eAccelerator must be loaded before Zend Optimizer in php.ini but using them together is not recommended.

    Perhaps that’s the problem.

    From your phpinfo it seems that the site is running as FastCGI on a Dreamhost shared server. I’m a little sceptical as to whether eAccelerator can be used effectively there (if at all). It needs a bare minimum of 32M of memory allocated to be useful for this plugin. Much more is better.

    If you are indeed on shared hosting, I would recommend against trying to use eAccelerator storage with this plugin. If you hit a server memory cap, your site could get shut down.


  137. Ono Oogami

    Apr 15th 2009
    #

    THANKs for the reply. I resolved the problem later .It’s maybe because by default Dreamhost runs php in php-cgi but EAC requires fastcgi, so if compiling and adding eac extension to php.ini in php-cgi mode, you may see it in phpinfo but in fact it’s not working which cause the eac storage option not available in plugin’s admin menu.


  138. Guy

    Apr 23rd 2009
    #

    Thanks for the reply- I’m using the stable version now rather than the svn and that error has gone away now.

    I have another question though, do you know if this plugin works together with php_speedy without modification of either? It seems to, although I’m getting the occasional 500 Internal Server Error, but that could just be down to not having enough memory on my server. Thanks.


  139. Murmatron Server Admin
    Admin Avatar
    Apr 23rd 2009
    #

    I don’t know of any reason why it wouldn’t work with PHP Speedy, but I haven’t tested it myself.

    I did implement a variation on a fix for the regular SuperCache plugin suggested by someone on the WP support forums who was having a problem with them working together. It was quite a while ago and just a matter of handling output buffering a bit better.

    The 500 errors could be due to XCache itself. I’ve seen the occasional random errors (not lack of memory related) with both APC and XCache on my server, but never with eAccelerator.


  140. Guy

    Apr 25th 2009
    #

    I have done some more testing now. It seems the crappy Dreamhost Private Server I have most of my sites on does not like the ‘Super’ part of wp-super-cache or wp-supercache-plus, and it was pushing the memory usage right up. So I’ve now disabled that part of the plugin and set it to half-on, and it’s working well with php_speedy, getting my YSLow scores up from the 40s to the late 70s. Which is nice.


  141. Murmatron Server Admin
    Admin Avatar
    Apr 25th 2009
    #

    Guy,

    I think the memory usage for the ‘Super’ part would be mostly due to the garbage collection. The generation and serving of the static files really shouldn’t use much at all.

    The version that I’m working on should use much less memory for garbage collection since it does away with the need for recursive directory scanning.


  142. Vito Botta

    May 4th 2009
    #

    This is awesome stuff. Many thanks mate for this excellent plugin!
    I am using it with eAccelerator on WP 2.7.1 and it seems to be working as expected.

    Only thing: it doesn’t seem to work together with PHP Speedy plugin :-(
    I had an earlier version of WP Super Cache which worked fine with PHP Speedy, but the thing I miss the most is that I have added the support for Amazon S3 / Cloudfront CDN (I use Cloudfront) directly in PHP Speedy!
    It is a very, very useful change because I can serve only one JS file and only one CSS file after the minification and gzip compression with PHP Speedy. The combined files, once created, are automatically uploaded to the S3 bucket used as is or for Cloudfront, and subsequent requests will look for these files from the CDN.
    I find this hack very, very useful because it too does help speed things up, as well as offload these static files (I also use another plugin to upload to S3 the images too).
    The Yslow score says that it is a good thing, and I was thinking to build another version of the PHP Speedy plugin with these changes so that others would benefit from it too.

    Are there any chances you could find the time to see why your plugin does not work with PHP Speedy?
    It’d be great if the two could work together!

    Many thanks though for the already excellent work.


  143. Vito Botta

    May 5th 2009
    #

    Still me :)
    I am running a few tests with ab, and have seen very low numbers of requests/sec, and something like 99% of cache misses after the test.
    The pages seem very fast when I try them in my browser, but these numbers don’t seem to be digg-proof :D
    What shall I normally expect? How can I possibly improve things?
    The last test I ran with my homepage says roughly 2 requests/sec. :D

    update: before submitting, I tried the “half mode” and got 10 requests/sec. Am lost :)


  144. Murmatron Server Admin
    Admin Avatar
    May 5th 2009
    #

    Vito,

    10 requests per second with ab in half-on mode doesn’t sound good. You shouldn’t be seeing 99% cache misses either. If the cache is primed, you should see 100% hits in half-on mode.

    I’d expect to see hundreds or thousands of requests per second depending on the hardware. My super-slow test server (a 600MHz P-III) does about 85 per second.

    Try benching half-on with disk storage. Perhaps eAccelerator isn’t storing the pages at all. You could also try benching an article page rather than the root of the site in case something about your site setup is preventing the ‘home’ page from being cached.

    I’ll try to have a look at PHP Speedy when I’ve got the latest iteration of the plugin cleaned up.


  145. Vito Botta

    May 6th 2009
    #

    Hi,

    many thanks for your so quick response. Yesterday I ran a few tests with the other plugin, WP Super Cache, and ab (on the same server) gave hundreds or thousands requests per second depending on the parameters etc. Even testing with simulated 100 or more concurrent connections, it worked fine and I saw nice numbers. Then I switched to Super Cache Plus with eAccelerator first and Disk storage then, and in both case either I saw very low numbers again, or – more often – the test would not even complete and I would need to forcefully restart the VPS.

    Later on I changed some other things in the settings for Apache, mySql, and I can’t remember what else, and am trying now again Super Cache plus. I haven’t tried ab yet again, I was just surfing a little the test website and now I saw something new:

    “500: Unexpected zero-length content

    WP-SuperCache-Plus has been given an empty output buffer to work with and is of the opinion that something has gone wrong with WordPress or a plugin.

    Note: The problem occurred outside of the WP-SuperCache-Plus plugin.”

    Any ideas? :-)


  146. Ovidiu

    May 6th 2009
    #

    just switched servers and my smaller websites are now running using suPhp so x-cache and eaccelerator and the likes do not work here, however, your plugin still sees them as installed and offers me the choice of using them which ends badly :-(

    is there a way for your plugin to recognize suPhp and not offer accelerators in the drop down but just the disk cache method?


  147. Murmatron Server Admin
    Admin Avatar
    May 6th 2009
    #

    Vito,

    Can you clear the cache and change the define('WPSCP_DEBUG', false); to define('WPSCP_DEBUG', true); in wp-content/wpscplus-config.php and do an apache bench with a small number of requests – maybe three would do so I can see page generation and (supposedly) cached responses – and then copypasta the contents of wp-content/wpscp-debug.log here.

    The most likely cause of the 500 - Unexpected zero-length content is hitting PHP’s memory limit, but it’s almost impossible to know exactly what’s going on without stepping through the page generation with a debugger.

    Have you checked for anything interesting in your server error log that would relate to either problem?

     

    Ovidiu,

    It should be easy enough to detect suPHP and restrict the plugin.


  148. Ovidiu

    May 6th 2009
    #

    cool, my control panel offers me the common mod_php, suPhp and fastcgi+suexec and as far as I understand, suPhp doesn’t support any accelerators, so maybe keep this in mind for the next version and possibly implement it?

    Thx. oviidu


  149. Vito Botta

    May 6th 2009
    #

    First of all, a HUGE thanks for these so quick responses and for your being so willing to help! :-)

    So, I ran a light “ab -n 3 vitobotta.com/” and the results are:

    1) Status = “ON”

    with eAccelerator: http://pastebin.com/mc34e5fe
    with Disk: d5513c79a

    2) Status = “Half ON”

    with eAccelerator: d46721d84
    with Disk: d4628a2d7

    As you can see, with the “Half ON” mode it seems to work better.
    I am not aware of anything else that would cause the zero length content error as this is the first time I see it since I started to customise this wordpress install. I am also a .NET developer, not as familiar with this stuff so I wouldn’t know what else to look at :D
    But I have the feeling that all is set, configured and working properly because I don’t see any other issues at all.
    The memory limit for PHP is currently set to 64M.

    (please note that the access to the website is currently forbidden to other IP addresses than mine to prevent indexing of the fake articles, tests, etc until I have the blog ready for publishing my own content)


  150. Murmatron Server Admin
    Admin Avatar
    May 6th 2009
    #

    Vito,

    Thanks for the debug logs. The SuperCache is clearly not working –
    either the .html files aren’t getting written to wp-content/cache/supercache/domain/.. or the Apache rewrite rules are wrong/missing. The rewrite rules from the regular WP-SuperCache aren’t still in the /.htaccess by any chance?

    According to the logs, Half-On seems to be working just fine for both disk and eAcc. The cached pages are being served in around 1ms. I can’t understand why that doesn’t benchmark as being really fast. :(

    Edit: I just had a thought that might account for some of the discrepancy – I notice that the plugin isn’t doing gzip. Is mod_deflate perhaps gzipping the content on the way out? I can’t believe it would be that slow, but I’m clutching at straws.


  151. ovidiu

    May 7th 2009
    #

    on a new server right now, no eaccelerator only xcache available. when I switch to xcache I am asked a username/password… it doesn’t take the combination I use for the xcache backend :-( just displays: XCache Auth Failed. User and Password is case sensitive :-(

    is this normal?


  152. ovidiu

    May 7th 2009
    #

    followed by: Fatal error: xcache_count() [function.xcache-count]: xcache.admin.user and xcache.admin.pass is required in /var/www/clients/client1/web9/web/wp-content/plugins/wp-supercache-plus/storage/xcache.php on line 229


  153. ovidiu

    May 7th 2009
    #

    even to switch from xcache to disk it wants a password and it doesn’t take the one I set up in xcache.ini :-( although the same pw works on teh xcache administration page…


  154. Murmatron Server Admin
    Admin Avatar
    May 8th 2009
    #

    XCache is odd. Most of the caching systems that I’ve seen using XCache seem to require

    xcache.admin.enable_auth = Off

    due to several useful functions being ‘admin functions’.

    Whether that’s wise depends on whether someone else can create an admin page on your server.

    I’ve rummaged through the XCache source code again and I still can’t see a way around it. It would be nice if the admin functions took username/password as arguments, but they don’t.

    Why it doesn’t accept the username and password is a mystery. The source code implies that it should, but it doesn’t work for me either. Even if that did work, cache purging actions triggered by users (e.g. commenting) would still fail since they don’t know the username and password.

    Also; XCache documentation sucks. I just thought I’d get that off my chest.


  155. Ovidiu

    May 8th 2009
    #

    yeah, I came to the same conclusions. They even state that setting the auth to off is not advisable…
    I jsut thought to switch to x-cache because its in the debian lenny repositories, while eaccelerator has to be recompiled after each php upgrade…

    anyway, on the new server I use suPhp for most of the smaller sites, only the biggest one, an wpmu installation is running on suexec with fastcgi so I thought I’d give that one an excelerator as well.

    might try and switch back to eaccelerator though…


  156. ovidiu

    May 8th 2009
    #

    do you have any idea how to enable eaccelerator with fastcgi? I found these links but am unsure how to follow them, have no idea how to switch t ocgi kill all fcgi processes then back to fcgi…http://serversupportforum.de/forum/faqs-anleitungen/18518-how-php5-2-3-mit-suphp-eaccelerator-automatische-vhost-conf-f-r-plesk.html http://wiki.dreamhost.com/EAccelerator


  157. ovidiu

    May 9th 2009
    #

    found out it works perfectly, had to enable eaccelerator inside /etc/php5/cgi/php.ini and copy the eaccelerator admin “panel/script” inside the right vhosts to be able to see anything :-)


  158. dfraser

    Jun 29th 2009
    #

    Hi, this plugin sounds just like what I need – has it been tested with WP 2.8 yet? I was going to upgrade to that soon but a faster site is more important….


  159. Murmatron Server Admin
    Admin Avatar
    Jun 29th 2009
    #

    Not tested with 2.8 yet, but I’m not aware of any reason why it won’t work.


  160. Murmatron Server Admin
    Admin Avatar
    Jul 3rd 2009
    #

    Tested with WP2.8

    Nothing exciting to report. Everything seems boringly normal with respect to normal operational parameters.

    I also publicly resolve to find more time to get back to developing this plugin in the not too distant future. I did fix a bug in the bleeding edge SVN version today, which at least means I still remember how it works.


  161. Andy Beard

    Jul 7th 2009
    #

    Time to update my bleeding edge


  162. James

    Jul 13th 2009
    #

    Anyone get this working with xcache, also getting the username and password error, even tried switching off authentication, no go.

    Thanks


  163. James

    Jul 13th 2009
    #

    Or alternatively, what is a better caching solution for an apache/php/mysql setup on a VPS?


  164. Murmatron Server Admin
    Admin Avatar
    Jul 13th 2009
    #

    James,

    I don’t use XCache on any production servers, but here’s the php.ini settings that I use on my dev (Windows) server. It works for me (or I would have given up trying to support it in the plugin).

    [xcache-common]
    zend_extension_ts="php_xcache.dll"
     
    [xcache.admin]
    xcache.admin.enable_auth = Off
    xcache.admin.user = "admin"
    ; xcache.admin.pass = md5($your_password)
    xcache.admin.pass = ""
     
    [xcache]
    xcache.shm_scheme = "mmap"
    xcache.size = 16M
     
    xcache.count = 1
    xcache.slots = 8K
    xcache.ttl = 0
    xcache.gc_interval = 3600
     
    ; same as aboves but for variable cache
    xcache.var_size = 8M
    xcache.var_count = 1
    xcache.var_slots = 8K
    xcache.var_ttl = 0
    xcache.var_maxttl = 0
    xcache.var_gc_interval = 300
     
    xcache.test = Off
    xcache.readonly_protection = Off
    xcache.mmap_path = anonymous
     
    xcache.coredump_directory = ""
     
    xcache.cacher = On
    xcache.stat = On
    xcache.optimizer = On
     
    [xcache.coverager]
    xcache.coverager = Off
    xcache.coveragedump_directory = ""

  165. Everton

    Jul 13th 2009
    #

    Hi

    Just installed this and it seems to be working well – thanks! Quick question – is there any value to installing DB cache at the same time?

    Thanks

    EB


  166. Murmatron Server Admin
    Admin Avatar
    Jul 14th 2009
    #

    Everton,

    It’s hard to say. I’ve seen all kinds of feedback on DBCache and it seems to me that what you get really depends on the individual site and its traffic patterns. I tried it and found it made things slower, but then I don’t use any plugins that hammer the database and I’m using the (not finished yet) fragment caching functionality of my plugin which tends to reduce the DB load anyway.

    I’d try with and without and see which works best for your site(s) – there’s no incompatibility issues that I’m aware of.


  167. James

    Jul 14th 2009
    #

    Thanks, I’ll give that a try and let you know the outcome.


  168. James

    Jul 14th 2009
    #

    Hmm still no go, changed xcache.ini as per your config above, then reloaded Apache…still getting the error…


  169. James

    Jul 15th 2009
    #

    Update: installed APC and all is working fine now…decided APC was better anyways…


  170. Murmatron Server Admin
    Admin Avatar
    Jul 15th 2009
    #

    decided APC was better anyway

    I’d tend to agree with you there, but I shy away from recommending or slighting any particular option since it’s impossible to know the degree of pseudo-religious devotion that someone might have.

    The last thing I want is an X is better than Y flame war :\

    I just try to make each option work as well as it’s functionality and API will allow and leave it up to the user to find the right one for them.


  171. Everton

    Jul 18th 2009
    #

    Hi

    Great plugin, but it eventually took my server down cause the childprocesses were continuously restarting because they were getting segmentation faults over and over again. I was getting hundreds of errors piling up like the one below:

    [Sat Jul 18 12:32:30 2009] [error] [client 75.89.9.27] PHP Warning: Cannot modify header information – headers already sent in /home/wincom/public_html/wp-content/plugins/wp-supercache-plus/wp-cache-phase2.php on line 405, referer: http://www.google.com/search?source=ig&hl=en&rlz=1R2TSHB_enUS336&q=windows+7+release+date&aq=2&oq=windows+7&aqi=g10

    I have APC on my server – any idea what’s going wrong? is it because i’d previously modified APC to work with Super-cache (following this post: http://markjaquith.wordpress.com/2006/02/13/adventures-with-wp-cache2-apc/)

    Thanks!

    EB


  172. Murmatron Server Admin
    Admin Avatar
    Jul 18th 2009
    #

    Everton,

    The php.ini setting you changed for Super-cache isn’t the cause of the problem – it just prevents APC from caching the Super-cache config file so that when you change settings they take effect immediately. In fact; I suggest that this might be a good idea for my plugin in the APC notes of the readme. eAccelerator has a similar feature and similar solution.

    Unfortunately, the warning message from your logs isn’t very helpful. Without something like XDebug that logs a trace for the warning, it’s impossible to tell where the warning is actually coming from.

    I’m loath to suggest turning the plugin’s debug logging on since I don’t think it’s likely to track down the source of the problem.

    One suggestion is to run it for a while using ‘Disk’ storage, see if the Warnings persist.

    Another is to look at whether APC’s shared memory cache is being maxed out. I don’t know how it behaves when it gets filled up – perhaps that’s where the problem lies. As a rule of thumb (based on my eAccelerator performance) around 16MB is required just for the compiled WordPress scripts. Caching pages in there too means that a relatively small and not particularly popular blog can hit 24MB (total) quite easily.


  173. Murmatron Server Admin
    Admin Avatar
    Jul 18th 2009
    #

    ANNOUNCEMENT

    I’m giving serious consideration to shutting down the comments on this topic and moving over to the Trac I’ve been setting up instead.

    A WordPress post and a readme.txt is no longer the best vehicle for the development of this plugin.


  174. Everton

    Jul 19th 2009
    #

    I tried using Disk rather than APC and I still got errors? Any other ideas?

    Thanks for the help btw.


  175. Murmatron Server Admin
    Admin Avatar
    Jul 19th 2009
    #

    The only thing I can suggest is to look closely through the logged Warnings and see if there are others Warnings or Errors mixed in amongst the ‘Cannot Modify Header Information’ ones.

    I’m fairly confident that with the way that SuperCache-Plus handles output buffering, any ‘Cannot Modify Header Information’ warning should have a logged error or warning of a different type as its root cause.

    You could also copy and paste a representative chunk of the error log to http://apache.pastebin.com/ and then I can have a look myself.


  176. Everton

    Jul 19th 2009
    #

    Hi

    I think I know what the problem might have been. I didn’t create the .htaccess file in wp-content/cache and I had some stuff in my wp-config file that I think shouldn’t have been there that I’ve deleted.

    I can’t actually create the .htaccess file – my FTP client won’t let me add it. Any idea why?

    Thanks

    DS


  177. Murmatron Server Admin
    Admin Avatar
    Jul 19th 2009
    #

    I’m guessing the reason you can’t create wp-content/cache/.htaccess is likely to be the same reason that the plugin can’t create it automatically.

    The plugin actually removes and recreates it with new values if you change the Expiry Time in the admin interface to ensure that Apache sends the correct cache-control and expiry headers.

    It must be a permissions issue. Apache apparently can’t write to wp-content/cache either.


  178. Everton

    Jul 19th 2009
    #

    hi

    I got my host support team and they say everything is as it should be. Here’s their reply:

    Well, that is a valid point, but I do not think it is the case. Permissions and ownership on all the directories from ‘/home/onetipad/public_html’ to ‘/home/onetipad/public_html/wp-content/cache/’ are all as they should be – the only thing I can think of is that beginning in ‘/home/onetipad/public_html/wp-content/’, some files and directories are owned by ‘nobody’.

    If that was the case however, what the gentleman at Murmatron said about Apache not being able to write to the file would not be the case as ‘nobody’ is the user Apache runs as.

    Could the problem be solved by ditching APC and moving to a different cache? Do you recommend any?

    Thanks for showing so much patience.


  179. Murmatron Server Admin
    Admin Avatar
    Jul 19th 2009
    #

    I don’t think it’s an APC problem, although there is plenty of scope for being wrong there – it’s possible with any PHP op-code cache for problems to arise as a result of the ‘optimization’ they do when compiling scripts. I’m not clear on what optimizations APC does (if any) – the apc.optimization ini setting was removed in version 3, but that doesn’t mean that it isn’t doing it.

    I have seen some reports on the WordPress support forums of odd permissions on directories and files supposedly being left as a result of the (possibly failed) WordPress automatic update/upgrade processes.

    The fact that you can’t create the .htaccess still makes me point to permissions or ownership issues unless something silly is going on like your ftp client hiding ‘dot’ files from you. That won’t help much though, because if the .htaccess does actually exist but you can’t see it, were still no closer to working out what’s causing all the warnings.


  180. extremecarver

    Jul 21st 2009
    #

    Actually is half-on mode with xcache faster than on mode with xcache?

    My main concern is memory use (I only got around 720MB free for apache to use) and equally important cpu use.


  181. Murmatron Server Admin
    Admin Avatar
    Jul 21st 2009
    #

    Actually is half-on mode with xcache faster than on mode with xcache?

    I suppose it’s possible. Certainly not on my dev hardware – it would max out at around half the requests per second as the static files coming from Apache

    My main concern is memory use (I only got around 720MB free for apache to use) and equally important cpu use.

    This site is running in 384MB TOTAL with 2 instances of Apache2.2 (one mod_php5 and one mod_php5+mod_python with 64MB allocated for eAccelerator shared memory). I guess it comes down to the size of your site(s) – there’s no way to know how much space the caching is going to use until you do it. Lots of registered users or commenters will require much more cache space than a site that has mostly anonymous hits.

    Try starting at 64MB, monitor the XCache usage and increase if necessary.


  182. extremecarver

    Jul 21st 2009
    #

    thanks for your quick answer.
    I have about 10.000 pageviews on my site per day, approx 5% by registered users (am I correct in assuming that anyone who put down a comment is considered “registered”?).
    I do get bout 10 comments per day on my site.

    I do use xcache with 64MB, still have not really found out how to monitor the xcache usage. wp supercache-plus only shows cache content if not xcached but using DISK which is of course slower.


  183. Murmatron Server Admin
    Admin Avatar
    Jul 21st 2009
    #

    am I correct in assuming that anyone who put down a comment is considered “registered”?

    Effectively; yes. Anyone who has been cookied by WordPress is not served static files.

    …still have not really found out how to monitor the xcache usage…

    I think that all you need to do is put the contents of the admin directory from the XCache distribution somewhere on your server and http://yourdomain/xcache_admin_directory/


  184. extremecarver

    Jul 21st 2009
    #

    thanks again for your answers. One problem I have is that upon every reload of the plugin in the adming pages, it wants to rewrite .htaccess even though .htaccess is already up-to-date.

    I unloaded many php_modules and enabled qcache for mysql and now my site seems to be pretty stable. Server load only reaches 2-3 once about 10 people request pages at the same time.

    Only one strange thing seems to be happening for me. When I disable .htaccess modifications, and thereby only allow supercache pages, but not wp-cache pages to be created, server load is lower than with wp-cache.

    Am I right in assuming that there is no possibility to set xcache username and password for wp supercache plus and I therefore have to leave xcache without password protection? readme.txt does not mention it, I can’t find any configuration file for it, and the above comments seem to indicate so (I have no problems accessing xcache admin pages via browser directly after entering password).


  185. Murmatron Server Admin
    Admin Avatar
    Jul 21st 2009
    #

    Last things first: I haven’t managed to find a way round the XCache password thing. I don’t believe there is one.

    I’m not sure that I understand about the .htaccess and disabled WP-Cache thing. In fact, I’m sure I don’t understand.

    You’re likely right about .htaccess being rewritten when it isn’t necessary. Having said that it doesn’t cause me any problems and I don’t have a .htaccess at all, nor can the plugin create one even if it wanted to. Are you seeing logged warnings or just a message about file permissions on the admin page?

    To be honest; the code for the admin page is where I’ve done the least work since I forked off of Donncha’s SuperCache. There’s stuff going on in there that is suboptimal for sure. The whole .htaccess / rewrite rules thing is slated for a complete rework anyway to better support servers other than Apache, but it will be a while before I even get started on that.


  186. extremecarver

    Jul 21st 2009
    #

    sorry bout that. I simply thought that having set .htaccess to 777 supercache-plus would be able to write into it. Infact it was not and .htaccess stayed untouched. I now put the necesserry changes into it by hand.
    Without .htaccess only supercache pages on disk were created, however no single wp-cache page got created (althout xcache was already serving pages allright).

    I have a myriad of caching plugins installed to cope with load (can’t find out why my wordpress is so slow), I do think that xcache was working without supercache-plus too. Actually queries of supercache pages trippled since I input the .htaccess rules. This doesn’t really matter as mysql queries via qcache seem to cause nearly no load at all (99.5% of rendering time according to debug queries is php, 0.5% of time is needed for mysql queries which get served to about 95% from memory by qcache).

    The biggest improvements to my server-load were caused anyhow by cutting down on apache modules to the bare minimum required for wordpress and not by any caching….

    Strangely however, only myself creates new wp-cache pages, even people commenting seem to get directly served supercache pages, easily viewable by nearly 100% cache misses:

    XCache-Cache

    * Initialised: 2009-07-21 22:15
    * 19 total cached pages (average TTL: 984745s)
    o 19 gzipped pages
    o 0 expired pages
    * Cache misses: 586 = 97%
    * Cache hits: 0 = 0%
    * Cache 304s: 12 = 2%

    Super-Cache

    * 507 files in cache (0 expired)

    ####################

    Xcache seems correct (last reset about 4 hours ago):
    php#0 memory used: 38MB; Hits 285,852 Misses 259 Clogs 217 Cached 252
    var#0 memory used 400kb; Hits 1921 Misses 1670 Clogs 0 Cached 42


  187. ovidiu

    Jul 22nd 2009
    #

    getting an error after upgrading to wpmu 2.8.2:

    the logfiles are saying: PHP Warning: Invalid argument supplied for foreach() in ….mu-plugins/wp-super-cache-plus/wp-cache-phase1.php on line 333

    any ideas what could be wrong?


  188. Murmatron Server Admin
    Admin Avatar
    Jul 22nd 2009
    #

    Yup; It’s a bug that shows if ‘Allow plugins to disable caching’ is set to ‘Allow’.

    I’ll fix ASAP, but for the moment just switching that setting to ‘No way’ will stop the warnings. I very much doubt there are any plugin developers that know about that hook, let alone use it.


  189. Murmatron Server Admin
    Admin Avatar
    Jul 22nd 2009
    #

    extremecarver,

    I was just thinking about your hits and misses…

    Each cookied user gets their own cached copy of each page and each comment would actually register as a cache miss since when the comment is posted the cache entry is purged and a new page is generated to include the new comment, so what you’re seeing there is probably not indicative of anything wrong at all. If most or all of the activity is commenting on one or two recent posts, I think you should expect mostly misses there.

    That fact, was one of the prime motivations for me starting the fragment caching functionality in my plugin. There’s usually a lot of stuff on a page that could be reused for a regeneration, but you need some way of saving it first. Only saving fully rendered pages is not the best approach for many usage patterns.

    Having digressed momentarily, I’d expect to see cache Hits and 304s much higher in ‘Half-ON’ mode where everyone (including bots) are being served from the same place.

    This site is currently currently in Half-ON mode…

    Initialised: 2009-07-21 10:28
    46 total cached pages (average TTL: 11152s)
    39 gzipped pages
    36 expired pages
    Cache misses: 120 = 52%
    Cache hits: 62 = 27%
    Cache 304s: 45 = 19%
    Request Rate: 222 per day.

  190. Murmatron Server Admin
    Admin Avatar
    Jul 22nd 2009
    #

    Released Version 0.7.5.5

    Minor fixes over 0.7.5.1


  191. extremecarver

    Jul 22nd 2009
    #

    I noticed that your site is running half-on mode, that’s why I asked in the beginning. Well I’ll try a day in half-on mode too.

    Let’s see if my server survives the evening. This morning it survived a spammer attack of around 5min and requesting each page (so all 108 plus tag pages and so on) at least a dozen times – I doubt many pages were actually served, but at least unlike before not the whole server went down running out of memory.

    I don’t really understand how they bypassed bad_behavior and wp-spammfree though…….
    Until now both protected me much better than Akismet…


  192. extremecarver

    Jul 22nd 2009
    #

    can’t edit, but just noticed that the link for the plugin still goes to 0.7.5.1.zip and 7.5.5.zip does not (yet) exist.

    Fragment caching really seems to be the way to go if you can implement it….

    BTW: I allways took out the bots from the exception for caching, hope that is the best way to do.


  193. Murmatron Server Admin
    Admin Avatar
    Jul 22nd 2009
    #

    I’ve moved the location for new versions. This page is in the process of being deprecated.

    Running this site in Half-On gives me the best opportunity to catch any problems on that side of the cache in my logs. It doesn’t get enough traffic to merit static files :( anyway and my upstream bandwidth will max out long before the eAccelerator WP-Cache runs out of steam.


  194. extremecarver

    Jul 22nd 2009
    #

    Well depending on how your server is setup, to me it actually seems that in half-on mode on my site cpu-load is actually lower, even though somehow 30 min. ago it deleted the cache, and I don’t understand why. I will password protect the admin site of xcache. Even though it’s not linked I somehow doubt some bot deleted my cache.

    Maybe after running 1-2 days static will be faster, for me half-on seems faster than full-on in the short run at least.

    After 30min running half on stats look like this:
    * Initialised: 2009-07-22 19:12
    * 181 total cached pages (average TTL: 983399s)
    o 157 gzipped pages
    o 0 expired pages
    * Cache misses: 162 = 31%
    * Cache hits: 291 = 56%
    * Cache 304s: 60 = 11%

    Nevertheless server load is pretty low. Xcache really works great and too I kicked out many useless apache modules.


  195. extremecarver

    Jul 22nd 2009
    #

    Is there any log where I could see why xcache is reinitialising? It seems to reinitialise about every halve day, deleting the cache I suppose (it was at 200 saved pages this midday, and now down to around 100 after it reinitialised twice sind midday.).

    Xcache itself has definitely enough memory available. After around 14 hours running half on xcyche reports 700.000 hits on php, and 374 misses.
    on var hits are just a tad higher than misses 4345 / 3749.

    Is there actually any possibility to put supercache pages into memory like xcache instead of disk? That would make the site spinning even faster.


  196. Murmatron Server Admin
    Admin Avatar
    Jul 22nd 2009
    #

    Is there actually any possibility to put supercache pages into memory like xcache instead of disk? That would make the site spinning even faster.

    That’s the very definition of Half-ON mode. Everything would be in XCache.

    As for XCache reinitialising, I don’t know where you’d find anything useful logged if there’s nothing in Apache’s error log.


  197. extremecarver

    Jul 26th 2009
    #

    when I try to give the development version a swirl I get the following error:
    “Warning! – Selected backend “Template” is no longer available. Choose another one.
    Cache has been temporarily disabled, but any SuperCached files will still be served.”

    How can I solve this?


  198. Murmatron Server Admin
    Admin Avatar
    Jul 26th 2009
    #

    Strange error. The storage engine template file has indeed been removed from the dev version, although it should never have been selectable.

    Edit wp-content/wpscplus-config and find

    $_WPSCP_Config->active_storage='Whatever it says now';

    Change it to read:

    $_WPSCP_Config->active_storage='disk';

    That should sort it out.

    Update: I’ve just realised what’s happened. The code to hide ‘Template’ from the drop-down list was removed at the same time as the template file. Upgrading to the dev version by unzipping and copying the files has left the template file in place.


  199. extremecarver

    Jul 26th 2009
    #

    Hmm, I think there was another reason it happened.
    1. I uploaded wp-supercache-plus in a folder named wp_supercache_plus_dev
    2. I deactivated 0.7.5.5
    3. I activated 0.7.6
    then the problem appeared. wp_supercache however seemed to be working well

    Then I put wp_supercache 0.7.5.5 folder into a subdirectory of plugins called old_plugins to completely disable it.

    Now my wp-adming would not load any more. Fix this by renaming the wp_supercache_plus_dev folder to wp_supercache_plus

    Reactivated it. However now there is no more footer cached by on my pages as served by wp_supercache.
    There seems to be some caching however, as generation time in Internet Explorer (logged out user) is staying constant. In firefox (logged into wp-admin, cookies) however wp supercache seems to work correctly only for on mode.

    Half-on mode seems to be broken now.


  200. Murmatron Server Admin
    Admin Avatar
    Jul 26th 2009
    #

    I think the plugin doesn’t like being in a directory other than wp-supercache-plus (hyphens, not underscores).

    Without trawling through stuff I’ve forgotten about, I’m sure there’s some legacy hard-coding of the directory name.


  201. extremecarver

    Jul 26th 2009
    #

    ups, underscore vs hyphens was a typo. really strange though, even deactivating and deleting wp-supercache-plus directory did not seem to change iexplorer 8 to go for non-cached pages.

    After going back to 0.7.5.5 I got supercache working again.

    On a sidenote, how do you uninstall wp-supercache-plus?
    1. Setting to off
    2. Deactivating it
    3. deleting files
    makes wp-admin failing to load, as well as failing to load any non supercached pages.

    If I put back wp-supercache-plus folder (does not matter which version), I can access wp-admin and non supercached pages again.


  202. Murmatron Server Admin
    Admin Avatar
    Jul 26th 2009
    #

    Deactivation should be enough, but file permissions can get in the way.

    If deactivation isn’t enough, manually removing the following should restore WordPress to normal operation:

    • The wp-content/advanced-cache.php file.

    • The contents of the wp-content/cache directory

    For completeness, the rewrite rules should be removed from /.htaccess although if there are no static files to serve they do nothing to interfere with WordPress.


  203. extremecarver

    Aug 10th 2009
    #

    After having other stuff to do lately, I tried again to get one of your newer versions working but fail. Any idea how to solve this?

    Fatal error: Cannot redeclare wpscp_define_wpscp_home_dir() (previously declared in /srv/www/vhosts/openmtbmap.org/httpdocs/wp-content/plugins/wp-supercache-plus/wp-cache.php:51) in /srv/www/vhosts/openmtbmap.org/httpdocs/wp-content/plugins/fragment-caching/wp-cache.php on line 60 M8.3 to work. but it won’t work:


  204. extremecarver

    Aug 11th 2009
    #

    Upps my bad. I had the svn version in plugins folder too (deactivated did not matter). the m8.3 however does not seem to be able to refresh the cache.

    Cache Content is allways 0 in all fields, and older supercache and older cache files get served. Clicking onto delete cache does not actually delete the cache at all.

    This is the same for svn and m8.3.

    Going back to 7.5.5 and everything runs smooth again…


  205. Murmatron Server Admin
    Admin Avatar
    Aug 11th 2009
    #

    There’s likely to be an issue where if you install one of the dev versions when there are already SuperCached pages. Those files won’t be in the database and won’t get deleted even with the ‘Delete Cache’ button. The plugin doesn’t know anything about them.

    This is something that has been bugging me since I suspect that there may be more elaborate ways of creating orphaned files (haven’t found one yet though). Some kind of ’sync db with filesystem’ function is probably on the cards.

    As for the wp-cached stuff. I’ve never seen that refuse to cooperate. There’s minimal difference between the release and dev versions there.


  206. extremecarver

    Aug 11th 2009
    #

    Strange, How could I solve it?

    Empty the supercache folder?


  207. Murmatron Server Admin
    Admin Avatar
    Aug 11th 2009
    #

    Strange, How could I solve it?

    Empty the supercache folder?

    Yup; cleaning the SuperCache dir should do it.

    The dev version tracks SuperCache files in a MySQL table. A record is created before the file is written, so it’s ‘orphan safe’ in so far as if the db insert fails, then no file gets written. Unfortunately it does’t deal well (at all) with files on the disk that don’t have a db record.

    All the purging and garbage collection is based entirely on what’s in the database, not what’s on the disk since recursive filesystem traversal was (is) one of the biggest bottle-necks in SuperCache.

    I’m forming the opinion that the delete cache button should probably revert to the old ‘kill it with fire’ approach and empty both the filesystem and database. Deactivation of the plugin still does it that way.


  208. extremecarver

    Aug 11th 2009
    #

    Hmm, strange enough. Deleting all wpscp from my database as well as deleting supercache folder on disk did not help. I only get supercache plus working with version 7.5.5 – no other version is doing anything for me…..

    Also Deactivated / Reactivated. Then reactivated old version, deactivated it. deleted it, moved in new version, activated it, but still no game….

    test.php passes fine though….


  209. Ray

    Aug 22nd 2009
    #

    Just tried out SuperCache-Plus on WPMU 2.7.1 and I’m getting this in the error log:
    [Sat Aug 22 07:48:35 2009] [error] [client 127.0.0.1] PHP Warning: Cannot modify header information – headers already sent by (output started at Z:\\www\\wp-includes\\functions.php:2767) in Z:\\www\\wp-content\\mu-plugins\\wp-supercache-plus\\wp-cache-phase2.php on line 672

    Note: The .htaccess lines were not automatically generated… not sure if there is a problem.

    SuperCache Plus Settings:
    -WP-Cache Storage Engine: eAccelerator
    -SuperCache Plus Status: Half On
    -Expire time: 3600 seconds
    -Cache Compression: Enabled
    -Allow plugins to disable caching: No way!
    -Last modified Headers: Enabled
    -Cache-Control Request Headers: Ignore

    Also I’ve noticed that “Cache misses” is at 100%.

    Any help here would be appreciated.


  210. Murmatron Server Admin
    Admin Avatar
    Aug 22nd 2009
    #

    I’ve just spent the last while trying to understand that warning.

    wpmu 2.7.1 functions.php:2767 uses (if apache_get_modules() doesn’t exist) an output buffer to look at the output of phpinfo() to determine if a particular Apache module is loaded.

    There doesn’t seem to be any mechanism by which that function can cause any output.

    I even tried putting the following code (does pretty much the same as what seems to be causing your warning) into the very start of my plugin…

    ob_start();
    phpinfo();
    $x=ob_get_clean();
    $y=apache_get_modules();

    … and that didn’t trigger anything on my server at all.

    My gut feeling on this one is that it’s a quirk of a particular PHP Apache SAPI version, but I don’t know.


  211. Ray

    Aug 22nd 2009
    #

    I did modify my wp-includes/functions.php file slightly (yeah, I know that’s bad, but anyway!)… so you might not be looking at the correct lines.


    function wp_ob_end_flush_all() {
    $levels = ob_get_level();
    for ($i=0; $i<$levels; $i++)
    ob_end_flush();
    }

    Line 2767 is the ob_end_flush() line.

    Hope that helps in some way.


  212. [...] plugin is compatible with WP Super Cache plus and can be deactivated and deleted without leaving any artifacts. Bookmark [...]


  213. Nicolas Setiono

    Sep 18th 2009
    #

    I had running wpscplus on my site which run wordpress version 2.8.4 but on the statistic it’s always look 0

    Memcached-Cache

    * Initialised: 2009-09-18 10:03
    * 0 total cached pages
    o 0 gzipped pages
    o 0 expired pages
    * Cache misses: 0 = 0%
    * Cache hits: 0 = 0%
    * Cache 304s: 0 = 0%

    Super-Cache

    * 0 files in cache (0 expired)

    is there something wrong with it cause i had set to use memcached
    something weird here


  214. Murmatron Server Admin
    Admin Avatar
    Sep 18th 2009
    #

    It might just be a configuration problem.

    What IP / Port is memcached running on?

    What version of wpscp plugin are you using?


Search

There is much more rubbish here. Feel free to fritter upon the handy box supplied below.