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.
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 ๐
Does it work with multisites as well? my site keeps crashing every time I try to install it. Thanks.
It is still the same with the old db cache reloaded. i only patch it so it can work with WP 3.1. I will working on make it support multi site feature.
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
Open wp-content/db.php at line 73 change it to:
define( 'DBCR_PATH', WP_PLUGIN_DIR.'/db-cache-reloaded-fix' );
I will patch this update on WordPress plugin repo. Thanks for remind me.
i update the plugin to version 2.2.1 now. Thanks.
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..
Just install DB Cache Reloaded Fix. It is a replacement for DB Cache Reloaded.
Thanks a lot for your great help. Plugin works great now!
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!
Thanks Andy. I receive your donation this morning. I'm very happy and glad to hear that my patch could help you solve the issue.
Thanks a lot for sharing your nice patch.
Internet is a great tool thanks to people like you !
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?
Post nya ada berapa?
Thank you for the fixed version.Cache filter is not working.
wah komen ku di delete ? ๐
You comment is in this page: http://www.ivankristianto.com/internet/blogging/guide-to-improve-your-wordpress-blog-performance-for-free/1471/#comment-166067092
upsss iya.
thanks
Thanx for the patch ๐
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
Do you need to use any other cache plugin with this because WP Total Cache and Super Cache affected my adsense income. Thanks
I'm using Hypercache + WP-Minify + DB Cache Reloaded Fix
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!
you can try disable PHP Safe mode from .htaccess.
How I can do it?
Can you explain?
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
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
delete both plugins. and download my plugin from WordPress: "DB Cache Reloaded Fix", and activate it. Thanks.
I did that, the problems is with YOUR plugin ๐
send me your admin login from contact form. i will try to take a look.
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 …
if i were you i set it up at 1440 minutes (1 day)
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.
Yep Melissa I'm also having the same problem – unable to activate the plugin due to permission issues but everything is fine regarding premissions
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.
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.
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
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.
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…
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
@Crรฉation web haute savoie delete db.php under wp-content folder. I will patch this plugin in the future.
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!
@dysfunctionalparrot Thanks for you kind words.
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
@bijusubhash please follow this link to reduce your server load and optimize them http://goo.gl/id3Ai
thank you ivan…
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.
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
@michael.small i'm fixing that issue. i think i know what causing that issue. please stay tune for next update.
Excellent. Thank You.
Excuse, the problem with activation (chmod 755) isn't solved yet?
@youmagaz72 I beleive it is solve. but i have some reports that it have problem with server which is not using suPHP. what is you db cache reloead fix version? did you update to the latest one?
@ivankrisdotcomI use VDS. And in setting I didn't see usage suPHP.
db cache reloead fix: Version 2.2.4
WordPress: Version 3.2.1
@youmagaz72 Do you use WHM/CPanel for your server? do you use Apache? and please try to use suPHP instead of fastcgi.
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
@MrMintMarketing Disable the plugin, delete it and then go to wp-content folder and delete the db.php.
Thanks for Great Plugin, but do you have any function to clear the cache which I can use in the theme development?
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
i get also the fatal error did u got managed to fix it?
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!
@AdrianB Yes you can add it to filter in the plugin settings.
Thanks for fixing this plugin up for us Ivan, works fantastic here!
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
PS in the settings, my Cache Filter is blank.
@HartleyBSinger Can you send me your url? i will take a look. Thanks
@ivankrisdotcom@HartleyBSinger Thanks.
The URL is http://PetLvr.com …. it's on a wpMU installation, forcing the /blog/ folder in network configuration … I should have come back here since posting this. A new release and installation of the TLA plugin fixed the replication problem down the sidebar … If there are any tips to help reduce CPU usage in that Cache Filter, it would still be appreciated ๐
Thanks / HART
@HartleyBSinger@ivankrisdotcom as i browse to your site, i saw that the db cache working good.
Hello,
I'm using this plugin and it does just what I need.
Thanks alot and keep up the great work!
Regards
hi ivan, i am trying the plugin on http://www.biriyilik.com, i will write later for giving the information, thanks and take care
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?
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
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?
ย @ivankrisdotcomย
am using the default WP set-up.
also WP-Supercache is running – might that be the reason?
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!
try to make it larger such as 2880 mins
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
You only need to activate it just once.
Will it work for WP 3.6.1
Yes it will ๐
Working with WordPress 3.8?
thanks
Yes it is working.
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
Hi Vachart i will update the plugin soon
Hello,Ivan Kristianto:
I have been waited this plugin for 1 year. I hope you can still update this Plugin.
Best Regards
Hi Ivan I am also use your plugin and also I am still waiting for your update, can you spend some minutes please please please
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
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.
Hello, I would like to ask WordPress 4.7 version can be used? Thanks
Yea it’s still working
Hi Ivan!
I love this plugin & it really seems to make a difference in speed!
But PHP7 doesn’t like it.
I noticed from this thread that you can just remove the & from assign as new to make it 7 compliant for that bit.
https://wordpress.org/support/topic/any-way-to-use-it-on-wp-4/#post-9389802
And also “Class” seems to throw an error with WPEngine’s PHP7 Plugin Checker.
BUT: How can the ‘mysql_’ part be fully fixed to the new ‘mysqli’ to make it work in 7?
Here’s the output of the compatibility checker:
Quote:”
FILE: /home/mysite/public_html/wp-content/plugins/db-cache-reloaded-fix/db-functions.php
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
54 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
FILE: /home/mysite/public_html/wp-content/plugins/db-cache-reloaded-fix/db-module.php
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ-
FOUND 9 ERRORS AFFECTING 9 LINES
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ-
214 | ERROR | Assigning the return value of new by reference is deprecated in PHP 5.3 and forbidden in PHP 7.0
411 | ERROR | Extension โmysql_โ is deprecated since PHP 5.5 and removed since PHP 7.0; Use mysqli instead
421 | ERROR | Extension โmysql_โ is deprecated since PHP 5.5 and removed since PHP 7.0; Use mysqli instead
427 | ERROR | Extension โmysql_โ is deprecated since PHP 5.5 and removed since PHP 7.0; Use mysqli instead
430 | ERROR | Extension โmysql_โ is deprecated since PHP 5.5 and removed since PHP 7.0; Use mysqli instead
440 | ERROR | Extension โmysql_โ is deprecated since PHP 5.5 and removed since PHP 7.0; Use mysqli instead
441 | ERROR | Extension โmysql_โ is deprecated since PHP 5.5 and removed since PHP 7.0; Use mysqli instead
445 | ERROR | Extension โmysql_โ is deprecated since PHP 5.5 and removed since PHP 7.0; Use mysqli instead
450 | ERROR | Extension โmysql_โ is deprecated since PHP 5.5 and removed since PHP 7.0; Use mysqli instead
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ-
FILE: /home/mysite/public_html/wp-content/plugins/db-cache-reloaded-fix/db-cache-reloaded.php
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
73 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
91 | ERROR | Assigning the return value of new by reference is deprecated in PHP 5.3 and forbidden in PHP 7.0
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
FILE: /home/mysite/public_html/wp-content/plugins/db-cache-reloaded-fix/db-module-wrapper.php
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ-
FOUND 1 ERROR AFFECTING 1 LINE
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ-
105 | ERROR | Assigning the return value of new by reference is deprecated in PHP 5.3 and forbidden in PHP 7.0
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ-
” End Quote.
I’m not at all good at php, and wondered if there were an easy solution for the mysqli fix.
Thanks!
Thanks for the report, I will update this plugin this sometime soon