ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

"Unable to connect to your database" on every page (including static HTML pages)

January 16, 2011 2:53am

Subscribe [2]
  • #1 / Jan 16, 2011 2:53am

    CelebrationWeb

    38 posts

    I am in the process of migrating our EE site to a new server. After copying all the files over via rsync and importing the database, I’m running into the error:

    Database Error: Unable to connect to your database. Your database appears to be turned off or the database connection settings in your config file are not correct. Please contact your hosting provider if the problem persists.

    I’ve double-checked the DB settings by manually logging in via the command line with the same credentials and have no problems there.

    I even get the error on a static HTML page I created with nothing more than “Hello World!” It doesn’t require EE or any type of DB connection.

    What’s even more perplexing is I had an existing time.html that I migrated over from the old site. It loads fine.

    So I’m really confused. Any help would be appreciated.

    Thanks,
    -Alex

  • #2 / Jan 16, 2011 5:42pm

    Greg Salt

    3988 posts

    Hi Alex,

    Please make sure that you have cleared all your system/cache files. You can remove everything apart from any .htaccess file and index.html and the caches will be rebuilt as required. Have you double-checked that your system/config.php file is correct? Also, do you have an .htaccess file in your site root to remove index.php from the URIs? If so, please temporarily disable it.

    Cheers

    Greg

  • #3 / Jan 17, 2011 4:22pm

    CelebrationWeb

    38 posts

    Ahh, looks like the .htaccess file was the culprit. Thanks!

  • #4 / Jan 18, 2011 4:00am

    John Henry Donovan

    12339 posts

    Glad you are up and running again.Feel free to start a new thread if you have any more questions.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases