XF 1.5 [MAJOR] An unexpected database error occurred. Please try again later.

countryside

Active member
Hello,
I just changed servers, and I created a new database to put it in (changed name, username, and password). I then imported everything. I think XenForo is looking for the old one still. How do I change it?

Thanks,
Noah
 
The error is a database error (one of Zend_Db_Exception types) which should have the error message in the page source.

If it doesn't then you will likely need to contact your sysadmin or host for further troubleshooting and support.
 
Code:
<?php

$config['db']['host'] = 'localhost';
$config['db']['port'] = '3306';
$config['db']['username'] = ‘USERNAME’;
$config['db']['password'] = ‘PASSWORD’;
$config['db']['dbname'] = ‘DATABASE NAME’;

$config['superAdmins'] = '1';

This correct?
 
Code:
<?php

$config['db']['host'] = “localhost”;
$config['db']['port'] = “3306”;
$config['db']['username'] = “USERNAME”;
$config['db']['password'] = “PASSWORD”;
$config['db']['dbname'] = “DATABASE NAME”;

$config['superAdmins'] = “1”;

So that? I changed the ' to "
 
I recommend downloading Notepad++ and using that to edit php files.

You are still using magic quotes:
Code:
$config['db']['host'] = 'localhost';
 
Code:
<?php

$config["db"]["host"] = “localhost”;
$config["db"]["port"] = “3306”;
$config["db"]["username"] = “user”;
$config["db"]["password"] = “pass”;
$config["db"]["dbname"] = “name”;

$config["superAdmins"] = “1”;

@Brogan - I have that now. All ' are now ".
 
Last edited:
Code:
<?php

$config["db"]["host"] = "localhost";
$config["db"]["port"] = "3306";
$config["db"]["username"] = "user";
$config["db"]["password"] = "pass";
$config["db"]["dbname"] = "name";

$config["superAdmins"] = "1";

Aha! Fixed, I belive?
 
That looks better and your site seems to be up.

For future reference, Atom is a good cross platform text editor. It's developed by GitHub.
 
Back
Top Bottom