1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 Problem with config.php

Discussion in 'Troubleshooting and Problems' started by Ron G, Jan 21, 2015.

  1. Ron G

    Ron G Member

    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.
  2. Chris D

    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?
  3. Ron G

    Ron G Member

    They were missing when I opened it.
  4. Brogan

    Brogan XenForo Moderator Staff Member

    Make sure you use a program such as Notepad++ and save as UTF-8 without BOM.

    Your site would never have worked without the DB information.
  5. SpencerN

    SpencerN New Member

    I have this problem as well, can someone help me fix this?

Share This Page