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 load site preferences; No preferences found

June 22, 2011 4:39pm

Subscribe [3]
  • #1 / Jun 22, 2011 4:39pm

    thisconnect.be

    73 posts

    Hi,

    We are installing a site we developped.
    The installation first happened on a Windows PC (apache + MYSql)
    But speeds was not good.

    We advised the customer to consider Linux. Which they did.
    We moved the complete site to Linux (and set all the privileges, etc)

    Now we get: Unable to load site preferences; No Proferences found.

    The only thing that is changed is the hostname.

    We added a switch case into the config.php, wich set different items, for each host (dev, staging, live, ...)

    switch ( $_SERVER['HTTP_HOST'] ) {
    
        // local
        case 'www.kro-intranet.dev' :
        $db['expressionengine']['hostname'] = "server1.xxx";
            $db['expressionengine']['username'] = "user";
            $db['expressionengine']['password'] = "pwd";
            $db['expressionengine']['database'] = "dbname";
        break;
    
        // staging
        case 'kro-intranet.thisconnect.com' :
        $db['expressionengine']['hostname'] = "localhost";
            $db['expressionengine']['username'] = "user2";
            $db['expressionengine']['password'] = "pwd2";
            $db['expressionengine']['database'] = "dbname";
        break;
    
    }

    All the other code is the same.
    I found a lot of info referring to exp_sites table, but since we use 2.1.1, the info in there is not readable. So we cannot update the reference to the site.

    We are also NOT using the MSM.

    Any chance we can fix this?

  • #2 / Jun 22, 2011 4:47pm

    Jeremy Bise

    77 posts

    I use a similar setup for the config.  The only time I’ve ever received that error is when it couldn’t get to the database—either it was picking up the wrong domain (and thus using the wrong config options), or I had the hostname or user/password or database incorrectly configured.  It was always related to EE not finding my database though.  If that helps at all…

  • #3 / Jun 22, 2011 6:20pm

    Brandon Jones

    5500 posts

    thisconnect.be,

    Can you access the control panel properly? If so, check your site’s main index.php file and see if perhaps there’s an obviously incorrect setting in there, like site_short_name perhaps.

  • #4 / Jun 23, 2011 5:49am

    thisconnect.be

    73 posts

    Man, that hurts…

    It was indeed a simple password.

    A good night sleep, and some hints help a lot 😉

    Thanks

  • #5 / Jun 23, 2011 11:16am

    Brandon Jones

    5500 posts

    Ah, okay. Glad you got it figured out! Thanks for the assist as well, Jeremy.

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

ExpressionEngine News!

#eecms, #events, #releases