XF 1.4 Problem with config.php

I've done something to config.php that has shut down my board. I needed to set myself as a super admin, so I went into config.php (using Notepad) and found:


$config['db']['host'] = 'localhost';
$config['db']['port'] = '3306';
$config['db']['username'] = '';
$config['db']['password'] = '';
$config['db']['dbname'] = '';

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

My user number is 2, so I changed 1 to 2 and closed the file. Initially, I got an error message telling me that there was a problem with line 1 of config.php. I went back in to look at it and tried to restore it to its original text. I now get the following error message:

An unexpected database error occurred. Please try again later.

Chris D

XenForo developer
Staff member
Have you purposefully removed the username, password and dbname there for posting this? Or are they actually missing from the config.php file?