[bbDev] db_connect() calls db_connect_host() with wrong arguments

Asbjørn Ulsberg list at asbjorn.ulsberg.no
Sun Feb 15 17:23:52 GMT 2009


In both trunk and the latest alpha release of bbPress, I'm having problems with bbPress trying to authenticate against the database with 'admin at localhost' as credentials, yielding the error message:

  mysql_connect() [function.mysql-connect]: Access denied
  for user 'admin'@'localhost' (using password: YES)

I've done a bit of research and found that what seems to be happening is that the db_connect() function inside the file "class.bpdb-multi.php" calls the db_connect_host() function inside the "class.bpdb.php" file with the user's session cookie credentials as the database credentials. And since the default host is set to 'localhost', the login will be '<username>@localhost'.

The erroneous call is made on line 65 of "class.bpdb-multi.php". The problem is not seen on overview pages like the front page of bbPress, but once you open up a given topic, the error message is thrown.

Why would any of the "multi" parts of bbPress be in use here? Are they in any way related to WPMU? If they are, isn't it an error to be using those functions when my WP installation is not MU?

-- 
Asbjørn Ulsberg         -=|=-          asbjorn at ulsberg.no
«He's a loathsome offensive brute, yet I can't look away»






More information about the bbDev mailing list