Php Fatal Error Cannot Redeclare Class Wpdb
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow fatal error: cannot redeclare class wc_shipping_zones in the company Business Learn more about hiring developers or posting ads with us Stack Overflow
Woocommerce Table Rate Shipping
Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 woothemes million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Cannot Redeclare Class WPDB up vote 1 down vote favorite Just went to a site of mine earlier today, and it was completely a white screen. It runs on Wordpress. I also went to try and login to the login url, and it was completely white as well. So, I went ahead and tried upgrading to the latest version of Wordpress, which just came out today (3.0.4.), and I'm getting this error message when I try to login. Fatal error: Cannot redeclare class wpdb in /home/username/domain.tld/blog/wp-includes/wp-db.php on line 53 Does anyone know how to fix this? wordpress class fatal-error wpdb redeclare share|improve this question asked Dec 30 '10 at 7:35 Spencer B. 1181515 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote Hi Spencer B.: Not sure why this is happening but have you tried wiping all files except for the files in /wp-content/ and the login credentials in /wp-config.php and replace with all new files from WordPress 3.0.4 using FTP? If you do this chances are it will detect any needed changes in your database and upgrade itself. If you still get a white screen you might need to add a second theme, activate it and then reactivate the theme you want to use. Hope this helps. -Mike share|improve this answer answered Dec 30 '10 at 10:01 MikeSchinkel 2,98212131 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged wordpress class fatal-error wpdb redeclare or ask your own question. asked 5 years ago viewed 1553
Troubleshooting » Upgrade to 4.5.2 get PHP Fatal error: Cannot redeclare class WP_Screen Upgrade to 4.5.2 get PHP Fatal error: Cannot redeclare class WP_Screen Geoffd99 @geoffd99 4 months ago Hi all Hope you can help, I did the upgrade to 4.5.2 and then - no admin to site, white screen (plus errors if debug on). I have now put on debug to log file, there are warnings, the fatal error is this: [21-Jun-2016 14:14:51 UTC] PHP Fatal error: Cannot redeclare class WP_Screen in …/wp-admin/includes/screen.php on line 209 I have switched off all plugins inc askimet, except w3-total-cache since the website still works live, so don't want to mess up the cache. if this is the problem, http://stackoverflow.com/questions/4560860/cannot-redeclare-class-wpdb is very risky to remove (or switch off) the cache and lose the site forever. At least it is still working. Previously: I had a white dashboard, only the left side menu showing for plugins, WP functions showed a white screen. I fixed this by a one line edit to screen.php (and was working fine). I have tried it now with original and edited screen.php version, same fatal error. I have tried replacing https://wordpress.org/support/topic/upgrade-to-452-get-php-fatal-error-cannot-redeclare-class-wp_screen/ http.php with an older one (4.4) this has made no difference. Tips welcome! I am OK with a bit of coding. Thanks all, Geoff Viewing 15 replies - 1 through 15 (of 16 total) 1 2 → Tara @t-p 4 months ago Have you tried: - deactivating ALL (yes all) plugins temporarily to see if this resolves the problem (plugin functions can interfere). If this works, re-activate them individually (one-by-one) to find the problematic plugin(s). - If you can't get into your admin dashboard, try resetting the plugins folder by FTP. Also remember to deactivate any plugins in the mu-plugins folder (if you have created such folder). The easiest way is to rename that folder to mu-plugins-old. - switching to the unedited default Theme (Twenty Sixteen, etc.) for a moment using the WP dashboard to rule out any theme-specific issue (theme functions can interfere like plugins). If you don't have access to your admin area, use FTP , or your web-host's cPanel or whatever file management application your host provides (no Dashboard access required). Navigate to /wp-content/themes/ and switch to the default theme by renaming your current theme's folder by adding "-old" to the end of the folder name. Alternately, you can remove other themes except the default theme. That will force your site to use it
redeclare class wpdb December 27, 2010Application InfrastructurePostgreSQL, WordPressjrickard So over here at BeefyApps are using PostgreSQL instead of MySQL for our WordPress backend. There is this discussion in the WordPress codex https://beefyapps.com/?p=489 which talks about why they do not natively support PostgreSQL out of the box. However, we have decided that PostgreSQL is the way forward for us so we needed to find a work around. Luckily for us there is a plugin, PostgreSQL for WordPress, which will allow us to do this. So I followed the steps that were laid out in the Readme.txt that is fatal error bundled with the package and I eventually came to run the installation (after the configuration) and I was presented with a blank white screen. Not so lucky after all… I went through the logs and found: PHP Fatal error: Cannot redeclare class wpdb Which was originating in the class wp-db.php in the wp-includes directory. This was being invoked from the wp-admin/setup-config.php file. After some searching cannot redeclare class on the internet I came across some other posts talking about modifying the wp-functions.php file and some others which didn't really seem appropriate because they would be overwritten with an upgrade. I did find that in the wp-admin/install.php file, there was a reference to wp-db.php as part of the installer. I commented this section out and the installer ran successfully. I think this problem occurs because before the db.php file can run and eval the class definition inside the wp-db.php file, after it makes it's replacements for the file, the install.php file has already loaded and processed that class into memory. When we try to redefine the class it throws an error. Anyway it seems to work now. Post navigation ← Connecting to a Xen Console Export iCal to Excel or CSV → Search for: Recent Posts Writing iPhone Apps in Swift XCP 1.6 Console Connections Ruby ODBC and MSSQL delivering x96 Character PostgreSQL > MySQL (Facebook MySQL Article Response) Xen Cloud Platform; Mount Disk in different Virtual Host Archives April 2015 March 2013 February 2012 July 2011 June 2011 January 2011 December 2010 September 2010 July 2010 June 2010 March 2010 February 2