Disabled BP, re-enabled BP, now wp-admin shows slew of MySQL errors!
-
Hi there,
We have a multi-site WordPress 3.0.1 installation with BP 1.2.5.2 installed. I have posted this issue to the BP forums, but I think it may be Multisite-related based on what I’ve read online.
Today I just accidentally clicked “Network Deactivate” for the BuddyPress plugin, when I meant to deactivate a different one. Realizing my mistake, I immediately clicked “Network Activate” again for BuddyPress, and wp-admin came back with a page filled with a slew of these errors:
Warning: mysql_real_escape_string(): 8 is not a valid MySQL-Link resource in /home/wmaster/yexpress.net/wp-includes/wp-db.php on line 785
Warning: mysql_real_escape_string(): 8 is not a valid MySQL-Link resource in /home/wmaster/yexpress.net/wp-includes/wp-db.php on line 785
Warning: mysql_real_escape_string(): 8 is not a valid MySQL-Link resource in /home/wmaster/yexpress.net/wp-includes/wp-db.php on line 785
…The WP Admin side was basically unusable because it was just crammed with the above errors. So in my panic so as not to halt our team’s development I changed the offending function in WP core so that PHP warnings would be suppressed:
function _real_escape( $string ) { if ( $this->dbh && $this->real_escape ) { $orig_level = error_reporting(); error_reporting(E_ALL ^ E_WARNING); $result = mysql_real_escape_string( $string, $this->dbh ); error_reporting($orig_level); return $result; } else return addslashes( $string ); }
At least now wp-admin is somewhat usable, though there are still a handful of similar MySQL errors still appearing in the header of every wp-admin page request:
Warning: mysql_error(): 8 is not a valid MySQL-Link resource in /home/wmaster/yexpress.net/wp-includes/wp-db.php on line 922
…Another serious problem I noticed is that the “admin” account I’ve been using, which is supposed to be a Multisite Super-Admin, has lost a lot of its rights – and this is why I think this problem is Multisite-related. For instance, I can’t administer the global users table, or modify the available plugins to activate for sub-sites. Does anyone here know how to grant Super-Admin rights to a user, without access to the Super-Admin user management screens?
Any help would be so appreciated! I’m a bit panicky because my other developers need to be able to use wp-admin regularly.
Thanks.
- The topic ‘Disabled BP, re-enabled BP, now wp-admin shows slew of MySQL errors!’ is closed to new replies.