Firefox PHP

The database connection failed. Please check your database configuration in include/db/config.php. If the configuration is okay, check if the database server is running.

Posted by bsergent 
Quote

The database connection failed. Please check your database configuration in include/db/config.php. If the configuration is okay, check if the database server is running.

What a useless error message. How about some indication as to why the connection failed. Might just as well have said "Herpa derp, something dunt werk. Can I has a fix?"


Quote

'type' => 'mysql',
'name' => 'bsergent_phorum',
'server' => 'localhost',
'user' => 'bsergent_phorum',
'password' => '(password)',
'table_prefix' => 'phorum',
'port' => '3306',
'socket' => NULL,

That's all I changed in the file.

No gui help for setting the config up, but a "web installer" after I get it set up. And I thought phpbb3 was short sighted.

>.>
Quote
bsergent
Quote

The database connection failed. Please check your database configuration in include/db/config.php. If the configuration is okay, check if the database server is running.

What a useless error message. How about some indication as to why the connection failed. Might just as well have said "Herpa derp, something dunt werk. Can I has a fix?"

Great idea. Maybe we should change it to that.
A failure in connecting to the database is all we are getting back from trying to connect.


Quote

Quote

'type' => 'mysql',
'name' => 'bsergent_phorum',
'server' => 'localhost',
'user' => 'bsergent_phorum',
'password' => '(password)',
'table_prefix' => 'phorum',
'port' => '3306',
'socket' => NULL,

That's all I changed in the file.

So, is that correct? Is that database created on the localhost with the given username and password?

Quote

No gui help for setting the config up, but a "web installer" after I get it set up. And I thought phpbb3 was short sighted.

And you think flaming helps?


Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
Tried to set the newer version of Phorum and got the same error. Even if I changed all parameters for database (I inserted the correct ones) it still didn't work. But then I tried to upload my older folders of Phorum on FTP server and it worked. I was like "WTH?!! Now you're working?" Would be really happy if anyone could help me solve this problem.
I have this same problem. Did anyone ever find out what the problem is?

I'm guessing there is some mismatch of PHP versions and MySQL versions but it would be good to know what.

In my web browser, I get this text:

Phorum database configuration error
Phorum has been installed on this server, but the configuration
for the database connection has not yet been made. Please read
docs/install.txt for installation instructions.


If ssh to the server and sudo to root and then do this:

tail /var/log/httpd/advocates.net-access.log

I get:

74.71.234.49 - - [02/Nov/2020:15:51:55 +0100] "GET /admin.php HTTP/1.1" 200 376 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36"

And there are no related errors in the Apache error log, nor the MySQL log.

So what is going on? Where do I look for the correct error message?
Oh, and, to be clear, after I ssh to the server, I can do this:

mysql -h localhost -u advocates -p

and put in the correct password and connect to the database. So the username and password certainly work. I can also:

use advocates;

show tables;

And see that there are no tables.
Whatever error Phorum gets back from MySQL, why isn't the full error logged somewhere? The lack of useful error message is crippling.
I used Phorum for a client project in 2002. I have not used it these last 18 years. Now I'm trying it again. I'm installing it on a new CentOS server.

PHP 7.4.5 (cli) (built: Apr 14 2020 12:54:33) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.5, Copyright (c), by Zend Technologies

I'm disappointed that after all these years, something as basic as transparent logging of error messages is unavailable. I had an easier time in 2002.
Sorry, only registered users may post in this forum.

Click here to login