[wp-hackers] WP and Plugins DB connection conflicts

Peter Adams peter at oncefuture.com
Tue Jun 26 06:25:27 GMT 2007

I've been seeing some odd database connection conflicts between  
various plugin combinations and have narrowed the issue down to the  
fact that WP does not force a new database link to be created when it  
initiates its connection in wp-db.php. this is a problem if a plugin  
creates it's own db connection with the same user credentials as  
those used by WP and then closes the connection or produces errors on  
the link.


$this->dbh = @mysql_connect($dbhost, $dbuser, $dbpassword);


$this->dbh = @mysql_connect($dbhost, $dbuser, $dbpassword, true);

The bool at the end of the connection will force a new link to be  
created instead of piggybacking on an existing connection.



More information about the wp-hackers mailing list