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

ncbetz

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
 

Brogan

XenForo moderator
Staff member
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.
 

ncbetz

Active member
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?
 

ncbetz

Active member
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 "
 

Brogan

XenForo moderator
Staff member
I recommend downloading Notepad++ and using that to edit php files.

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

ncbetz

Active member
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:

ncbetz

Active member
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?
 

Chris D

XenForo developer
Staff member
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.
 
Top