Forum Replies Created
-
Thanks, Sam. I’ve sent you an e-mail.
Hi, Sam, and thanks for the reply and attention. The bb-config.php and wp-config.php files are practically identical, so the answer to your question is: no.
After some more digging, I’ve found that the perpetrator is the db_connect() function inside class.bpdb-multi.php. I don’t understand why that file should be in use on a non-multi WP/bbPress installation, but either way it’s that file that does the offensive db_connect_host() call with erroneous credentials, host, etc.
What’s really weird is that the front page of bbPress works, while opening a topic yields the “Access denied for user ‘admin’@’localhost’ (using password: YES)” error message. Why would class.bpdb-multi.php be in use on a topic page but not on the front page? Makes no sense.
I’m having the same problem and it seems that the WP integration for whatever mysterious reason forces the MySQL connection into “localhost” mode. I’ve configured both WP and bbPress to connect to another MySQL host, but still it seems like bbPress is trying to connect to “localhost”.
I added a print_r($args) inside the db_connect_host() function and found that the function is called twice and the first time the credentials, host, etc., are correct and the second time they aren’t. The second time the function is called, the credentials are for some reason set to the ones of the logged in user. So somewhere in the bbPress code, authentication is done not with the values stored in bb-config.php, but with the username and password of what’s stored in the session cookie and the host is then set to “localhost”.
I don’t know how to investigate this problem any further.
As I’ve written elsewhere, I’ve gotten everything up and running with trunk. As it might not be compatible with the release of WordPress I’m using (2.3.1), I’m wondering when a release of bbPress that fixes these problems and is compatible with WP 2.3.1 (or with the then latest available release of WP) will be available?
In reply to: DB access problem in the first installation step.I downloaded trunk and it now works. I hope there’s a new release soon that will incorporate these changes so I can use something a bit more stable than the current development version. It seems to be working fine, though.
The problem is; I’ve never explicitly told bbPress to connect via a local socket, and since I’m not a Unix expert, I didn’t really comprehend the error message. I now understand a bit more of what it says and that I should instruct bbPress to connect via TCP/IP instead. However, isn’t this something bbPress should have available as an option in the
config.php
file somehow? Or even just as an automatic switch it figures out based on whetherBBDB_HOST
is set (or is different fromlocalhost
) or not?In reply to: DB access problem in the first installation step.Which version of bbPress should I check out / download and apply the patch to? Trunk?
In reply to: DB access problem in the first installation step.There is still a set of problems with this. The value of
$this->$dbhname
isn’t checked before it’s used inmysql_get_server_info()
on line 75 indb-mysqli.php
. If the connection fails, the error won’t be echoed to the user because the use of@
on themysql_connect()
call and then the script just continues, assuming the connection went fine, which in my case, it din’t. Also, the call should be tomysql<b>i</b>_connect()
and notmysql_connect()
, as far as I can understand.The patch doesn’t fix these problems and they need to be fixed for bbPress to work on my host. I’d write these comments on the associated ticket, but there doesn’t seem to be any way to register or comment anonymously there.
I have the same problem and overwriting
db-mysqli.php
withdb.php
didn’t help. Just for completeness, here’s the error messages I encounter:Warning: mysql_get_server_info() [function.mysql-get-server-info]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /home/<snip>/bbpress/bb-includes/db-mysqli.php on line 73
I suspect bbPress of having hard coded a connection to
localhost
and thus configuringdefine('BBDB_HOST', '...')
to be something else thanlocalhost
doesn’t really matter. I don’t have MySQL and Apache installed on the same physical server, so I have to access MySQL through a hostname and thuslocalhost
won’t work.