wordpress-tag-cloud-plugin-names

DB Cache Reloaded Fix For WordPress 3.1

Since WordPress upgrade to version 3.1, there are some plugin compatibility issue for example DB Cache Reloaded. You may read my previous article DB Cache Reloaded not compatible with WordPress 3.1 as during plugin activation trigger an error: “DB Cache Reloaded Error: wpdb class is redefined, plugin cannot work!
Previous definition is at /home/xxxx/public_html/wp-includes/wp-db.php:52.
”.

As the plugin developer not responded to any complain in forums. I took a step to take a look at the code. And i finally found what cause it and patch the code. I have installed in some of my testing blog. So far so good. This patch is tested only in WordPress 3.1 environment. I’m haven’t tested for prior WordPress 3.1.

As this modified is quick and dirty fixed, please test it in your test environment prior to use it in your production website.

Usage instructions:
1. If you have DB Cache Reloaded activated in wrapper mode, please deactivate the plugin.
2. Download the module from the link at the end of this article.
3. Upload the module to your server, overwrite the current file.
4. Activate the plugin, and enable it from the Setting.

Download DB Cache Reloaded Patch For WordPress 3.1

Note: this is not an official release from the original developer. This patched is developed by me because i’m using DB Cache Reloaded in this blog and i want to upgrade to WordPress 3.1. Later i will make my own plugin which is rewrite from DB Cache Reloaded, and keep maintaining it for the community.

If you found any bugs or problem or issue or even want to say thanks, please use the comment box below.

This plugin has cost me hours of work, if you use it, please donate a token of your appreciation!

Update: Now DB Cache Reloaded Fix is availabe in WordPress Plugin Repository.

Update 25 October 2011: Release DB Cache Reloaded Fix v2.2.4.

Comments

  1. zeyus says:

    Thanks champ!!!! This fix works great, I just applied it on my website (I thought I would google for a solution before jumping into the code myself 🙂

  2. Iamar says:

    Does it work with multisites as well? my site keeps crashing every time I try to install it. Thanks.

  3. Guest says:

    Warning: require_once(/home/monta/www/wp-content/plugins/db-cache-reloaded/db-module.php) [function.require-once]: failed to open stream: No such file or directory in /home/monta/www/wp-content/db.php on line 94

    Fatal error: require_once() [function.require]: Failed opening required '/home/monta/www/wp-content/plugins/db-cache-reloaded/db-module.php' (include_path='.:/usr/share/php5') in /home/monta/www/wp-content/db.php on line 94

  4. happyches says:

    Ok.. so do we install both DB-Cache-Reloaded and DB Cache Reloaded Fix?
    Or do we just install DB Cache Reloaded Fix if we haven't installed either of them before?
    It's really not that clear to me..

  5. Thanks a lot for your great help. Plugin works great now!

  6. Andy says:

    Just uploaded it and tried it out – works very nicely. We are very happy about this fix, since we told all many buyers of our ecommerce themes to use the DB-cache-reloaded plugin. Thanks a lot!

  7. Julien says:

    Thanks a lot for sharing your nice patch.
    Internet is a great tool thanks to people like you !

  8. Comment-nya b. indo ahh..
    Salam kenal mas.. Plugins-nya bagus,,, cuma pas uda install di back-end dan font-end blog suka lama loadingnya.. kenapa ya?

  9. Jure Zgonec says:

    Thank you for the fixed version.Cache filter is not working.

  10. Hari H says:

    wah komen ku di delete ? 🙁

  11. Bilboid says:

    Thanx for the patch 🙂

  12. Ramigos says:

    I have problem, when I want to set cache i have :
    Cache nie może być włączone. Proszę ustawić chmod 755 na katalogu wp-content
    i changed wp-content to 777 in old plugin it works, now it isn't
    please help

  13. Jolinsz says:

    Do you need to use any other cache plugin with this because WP Total Cache and Super Cache affected my adsense income. Thanks

  14. Hi! I had installed the latest version of DB Cache Reloaded Fix and when I try to activate it I see the message:
    Caching can't be activated. Please chmod 755 wp-content folder.
    Caching deactivated. Cache files deleted.

    And I see this many times, but I had chmod wp-content folder to 755 or 777 – is taking no effect.
    Please help me solve this problem because I need to reduce the number of my DB queries, now Its ~150 on main page, so it no good.
    Thanks so much!

  15. guest1 says:

    how can I ignore certain parts of my website from being cached ? I have a forum and I don't want anything from the forum to be cached

  16. Autocaravanas del Sol says:

    I get this error when I try to activate:
    Plugin could not be activated because it triggered a fatal error.
    Warning: include(…/wp-content/plugins/db-cache-reloaded/db-functions.php) [function.include]: failed to open stream: No such file or directory in …/wp-content/plugins/db-cache-reloaded-fix/db-cache-reloaded.php on line 61

  17. Abied says:

    My blog has more than 20k hits everyday. I want to set the time of expired cache to the best. Which one is better? faster or lower? 20 minutes?
    Thanks …

  18. Thanks for the plugin fix for 3.1. I've never used this plugin before, but in trying to install it to my 3.1.1 blog, I get the error that wp-content folder should be chmod 755. This folder has always had these permissions. I even tried changing the folder to 777, but that didn't work either. Can you please help with how to enable the caching? Thanks!

    • Please check that you have "tmp" folder under wp-content and set it to 755 permission. Sometimes the problem is folder permission that doesn't allow the plugin to create a folder.

  19. Yep Melissa I'm also having the same problem – unable to activate the plugin due to permission issues but everything is fine regarding premissions

  20. neverweep says:

    I have translated this plugin to simplified chinese and traditional chinese. It's my first time to do this and i dont know how to send .mo & .po files to you. My mail address is in the comment meta.

  21. evernonesense says:

    it seems there are no language files packed in 2.2.2

    • Yes i have a very frustration internet connection this couple days.
      I thought that the lang files go through, but it didn't.
      I'm fixing it.
      Thanks for notify me.

  22. Mike says:

    Just a note that on my host with the htaccess file just being as it is the tmp folders and files can be accessed. If it's changed to -<Files *>Order allow,denyDeny from All</Files>it works

  23. Benipermana says:

    Om Ivan waktu pake Suphp ga ada masalah dgn db cache reloaded fix, tapi setelah saya ganti handler ke DSO muncul eror [function.fopen]: failed to open stream: Permission denied in sama header already sent, pdhl permission dah 755, knapa ya?
    apa harus chown jadi nobody?

    makasih

    • suPHP akan execute php code nya berdasarkan user permission. sedangkan dso akan menjalankan php dengan user apache (biasanya nobody). coba ubah permission wp-content/tmp menjadi 777.

  24. jphipps says:

    Any chance to be able to format the stats template so that the font size and centering on the page can be done? It's just hanging on the left and looks funky. Apparently standard html gets boogered up when putting in the window on the admin panel.

    Will be sending something on the development. Good work…

  25. Création web haute savoie says:

    Hello Ivan,

    My website is completely broken as soon as I uninstall your plugin. It says:

    Warning: require_once(/var/www/vhosts/votre-site-internet.com/httpdocs/wp-content/plugins/db-cache-reloaded-fix/db-module.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/vhosts/votre-site-internet.com/httpdocs/wp-content/db.php on line 94 Fatal error: require_once() [function.require]: Failed opening required ‘/var/www/vhosts/votre-site-internet.com/httpdocs/wp-content/plugins/db-cache-reloaded-fix/db-module.php’ (include_path=’.:’) in /var/www/vhosts/votre-site-internet.com/httpdocs/wp-content/db.php on line 94

    How can I fix this problem ?

    My website’s URL: http://www.votre-site-internet.com

  26. @Création web haute savoie delete db.php under wp-content folder. I will patch this plugin in the future.

  27. dysfunctionalparrot says:

    You my friend are a gentleman and a scholar for doing this! Work great, and now I finally have one of my favorite plug-ins back!

  28. @dysfunctionalparrot Thanks for you kind words.

  29. bijusubhash says:

    Hi I’m facing a problem. One day my website bijusubhash.com is suspended because of high resource usage. I request to re enable my website after that I’m using this db-cache-reloaded-fix plugin. Its now showing on footer “” Kindly please let me know is this value fine or not. If not what I have to do more on to reduce my server load.

    Kindly please replay.

    Thank you,

    Biju Subhash

  30. รักษ์สุขภาพ says:

    Hi,

    i am using WP 3.0.5 multisite with MySQL 16 db installed. The installation of 16 db required me to put file including db.php in the wpcontent folder. I notice that either disable or enable your DB Cache Reloaded Fix to the system will either delete or add your db.php file to the wpcontent. It will then destroy my subdomain system and show my wordpress site as no information on it. How can I resolve this problem? Can you set your file db.php to other name?

    Thanks,

    Charles

    • It is not possible to remove db.php since it is the core function that WordPress need to overwrite the global $wpdb so i can inject the cache mechanism system. I haven't test this plugin for multi database setup. So for now it is only available for single database setup. thanks.

  31. michael.small says:

    Hi, I have an ongoing error with your plugin. I always get error that I wp-content folder needs to be chmod 755. That folder is already set to that setting. I tried the suggestion of adding tmp folder and that didn't work either, including deactivating and uninstalling. All the permissions are properly set. What other option should I look at? Thanks, Carl

  32. youmagaz72 says:

    Excuse, the problem with activation (chmod 755) isn't solved yet?

  33. MrMintMarketing says:

    Please tell me, how do I FULLY remove this plugin from my website. I want to return my database exactly as it was before I installed this plugin.

    After I installed this, it works fine. Now I am duplicating my website to the same domain but with /temp for re-development whilst my website still runs.

    After migration, the /temp website keeps going back to the live site for ALL pages. I can also see that I have hundreds of instances referring to the root website and not /temp in the temporary website database. This is because of your plugin.

    Please tell me how to remove this so I can have my database EXACTLY as it was before I installed.

    Thanks

    Luke

  34. AndyNguyen says:

    Thanks for Great Plugin, but do you have any function to clear the cache which I can use in the theme development?

  35. megamind says:

    Hi Ivan!

    My content dir is not /wp-content/

    How can I get a plugin works? I've got errors with chmod 755 wp-content/db-cache-reloaded-fix/cache and can't save options because of chmod 755 file config.ini

    Regards

  36. RinoSatalo says:

    i get also the fatal error did u got managed to fix it?

  37. AdrianB says:

    Hi,

    is there a possibility to exclude some queries from caching? I use a own login system and caching is really bad with changed data.

    Thanks!

  38. Toten adler says:

    Thanks for fixing this plugin up for us Ivan, works fantastic here!

  39. HartleyBSinger says:

    Hi Ivan. I am using your plugin on my site and it has reduced CPU usage greatly, however with one side effect. It is replicating links in my sidebar that php code is embedded into a widget over and over (so far averaging about 300-400 times depending on visitors I believe, to the front page of my blog. And, on the single posts of my blog it is not showing up at all. Here's an image http://www.diigo.com/item/image/1d8vg/1rub .. Any suggestions? I'm on v3.3.1 WP

    HART

  40. Boardirectory says:

    Hello,

    I'm using this plugin and it does just what I need.

    Thanks alot and keep up the great work!

    Regards

  41. biriyilik says:

    hi ivan, i am trying the plugin on http://www.biriyilik.com, i will write later for giving the information, thanks and take care

  42. Frank13 says:

    I get the following error whenever I try to enable the plugin "Caching can't be activated. Please chmod 755 wp-content/db-cache-reloaded-fix/cache folder". Yet, there is no directory close to that to set the permissions for. Is this plugin flawed or is there a fix for this issue?

  43. CordMailBeez says:

    HI Ivan,
     
    thanks for the recent update for WP 3.4!
     
    However am having following issue:
    am using WP DB-Manager which does e.g. a daily back-up. The query caching prohibits the plugin the update the status, so it keeps running until the DB cache is refreshed (got once 800 emails with 2mb attachements….)
     
    any solution available? I assume the same might happen with any pluing using scheduled task

  44. CordMailBeez says:

    HI Ivan,
     
    thanks for the recent update for WP 3.4!
     
    However am having following issue:
    am using WP DB-Manager which does e.g. a daily back-up. The query caching prohibits the plugin the update the status, so it keeps running until the DB cache is refreshed (got once 800 emails with 2mb attachements….)
     
    any solution available? I assume the same might happen with any pluing using scheduled task

    •  @CordMailBeez
      I am myself using WP DB manager to do weekly backup. and i found not errors so far. I would like to know what plugins you are using that has cron schedule task?

      • CordMailBeez says:

         @ivankrisdotcom 
        am using the default WP set-up.
        also WP-Supercache is running – might that be the reason?

  45. memoxxxx says:

    Hi ivan, your plugin seems to work on my site, but despite the number of minutes I set it to expire, i see my cache folder clearing too quickly. It starts to fill but then after i refresh the homepage once or twice the cache folder clears! and it is set to expire at 1440 minutes!

  46. Bian says:

    Hi, I had some multi sites under WP, and I’m using your plugin, should I activate DB Cache Reloaded Fix one by one? Or need to activate the main site only? Please answer me, thanks

  47. Riu says:

    Will it work for WP 3.6.1

  48. Jose says:

    Working with WordPress 3.8?
    thanks

  49. vachart says:

    Helllo, i notice thus report on debug=true

    Notice: Constant EZSQL_VERSION already defined in /homez.783/vachart/www/wp-content/db.php on line 43

    Notice: Constant object already defined in /homez.783/vachart/www/wp-content/db.php on line 48

    Notice: Constant OBJECT_K already defined in /homez.783/vachart/www/wp-content/db.php on line 53

    Notice: Constant ARRAY_A already defined in /homez.783/vachart/www/wp-content/db.php on line 58

    Notice: Constant ARRAY_N already defined in /homez.783/vachart/www/wp-content/db.php on line 63

    Deprecated: Assigning the return value of new by reference is deprecated in /homez.783/vachart/www/wp-content/plugins/db-cache-reloaded-fix/db-module.php on line 214

    Notice: Constant EZSQL_VERSION already defined in /homez.783/vachart/www/wp-content/plugins/db-cache-reloaded-fix/db-module.php on line 43

    Notice: Constant object already defined in /homez.783/vachart/www/wp-content/plugins/db-cache-reloaded-fix/db-module.php on line 48

    Notice: Constant OBJECT_K already defined in /homez.783/vachart/www/wp-content/plugins/db-cache-reloaded-fix/db-module.php on line 53

    Notice: Constant ARRAY_A already defined in /homez.783/vachart/www/wp-content/plugins/db-cache-reloaded-fix/db-module.php on line 58

    Notice: Constant ARRAY_N already defined in /homez.783/vachart/www/wp-content/plugins/db-cache-reloaded-fix/db-module.php on line 63

    Deprecated: Assigning the return value of new by reference is deprecated in /homez.783/vachart/www/wp-content/plugins/db-cache-reloaded-fix/db-cache-reloaded.php on line 91

  50. Visit says:

    Excellent weblog here! Also your site rather a lot up very
    fast! What web host are you using? Can I get your associate hyperlink to your host?
    I want my site loaded up as quickly as yours lol

  51. Will you be updating DB Cache Reloaded Fix anytime soon? It hasn’t been updated in over two years, according to WordPress. A great update would be to remove the mysql_* functions and hook into the $wpdb class. Then MySQLi is used as an extension if PHP version >= 5.5 and WordPress version >= 3.9.

Trackbacks

Give me your feedback

%d bloggers like this: