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.

(urgent) Site Error: Unable to Load Site Preferences; No Preferences Found

November 09, 2012 9:58am

Subscribe [2]
  • #1 / Nov 09, 2012 9:58am

    onedogmedia

    31 posts

    I’ve been developing a site at Engine Hosting (EE 2.5.3 i believe) and using their temporary URL (http://mysitename.ehclients.com) and all working fine.  Yesterday we were ready to go live, and knowing that all the paths needed to be updated in the CP to the real domain, I started going through and updating them.  THis is prior to changing the name servers for the real domain to point to Engine Hosting.  I guess this was the wrong approach, and I should have done it in the opposite order - because right when I updated the General Configuration to the new domain, all heck broke loose.

    I ended up with a white screen for both the site and the CP.  Debugging revealed that exp_sites had crashed, so I did a repair in PHPMyAdmin.  That worked well, but now I get the dreaded Site Error: Unable to Load Site Preferences; No Preferences Found.

    I have checked my index.php, admin.php, database.php and config.php files to make sure they have the correct site url in places where the temp URL was there instead.  My system path is correct in all.  In config.php, I made sure of these two items:

    $config['cp_url'] = 'http://mysite.com/admin.php';
    $config['base_url'] = 'http://mysite.com/';

    Hoping the last one would overwrite any problems I had in not fully updating all the paths.  Still, no dice.  Same error message. 

    I don’t know what else to modify.  I did a database dump and found that my temp URL is still scattered throughout the file.  Wondering if I could manually replace it and upload back to the DB.  or do an SQL replace, though a bit nervous to attempt.

    I have a support request with EH pending but they are busy, and this is a time-sensitive issue so need help quickly. 

    Any help appreciated.

  • #2 / Nov 09, 2012 10:32am

    glenndavisgroup

    436 posts

    Hi oliversitedesign,

    Are you using htaccess for anything? If so, have a look there.

    What if you put it back to the temp URL you had, does it work?

    Mike

  • #3 / Nov 09, 2012 10:36am

    onedogmedia

    31 posts

    I do have a .htaccess file to remove index.php from the URL, like so:

    <IfModule mod_rewrite.c>
            RewriteEngine On
    
            # Removes index.php
            RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteCond %{REQUEST_FILENAME} !-d
            RewriteRule ^(.*)$ /index.php/$1 [L]
    
            # If 404s, "No Input File" or every URL returns the same thing
            # make it /index.php?/$1 above (add the question mark)
    </IfModule>

    the temp url gives the same error message on both CP and regular home page. :shut:

  • #4 / Nov 09, 2012 12:00pm

    onedogmedia

    31 posts

    Could this be a problem in EE_config.php?

    /**
      * Update Database Config File
      *
      * Reads the existing DB config file as a string and swaps out
      * any values passed to the function.
      *
      * @access private
      * @param array
      * @param string
      * @return bool
      */
     function _update_dbconfig($dbconfig = array(), $remove_values = array())
     {
      // Is the database file writable?
      if ( ! is_really_writable($this->database_path))
      {
       show_error('Your database.php file does not appear to have the proper file permissions.  Please set the file permissions to 666 on the following file: expressionengine/config/database.php');
      }
    
      $prototype = array(
           'hostname' => 'localhost',
           'username' => '',
           'password' => '',
           'database' => '',
           'dbdriver' => 'mysql',
           'dbprefix' => 'exp_',
           'swap_pre' => 'exp_',
           'pconnect' => FALSE,
           'db_debug' => FALSE,
           'cache_on' => FALSE,
           'cachedir' => '',
           'autoinit' => TRUE
          );

    should hostname not be localhost?  the host name is correct in database.php…..

  • #5 / Nov 09, 2012 12:44pm

    glenndavisgroup

    436 posts

    Your EE_config.php looks fine. The only thing I can think of is try re-upload your folders and files again and check to make sure they are all getting uploaded ok. Sometimes certain files get corrupted during upload and that might be the cause. Then double check your folder permissions. Not sure what else it can be? Sorry I couldn’t be of more help.

    Mike

  • #6 / Nov 10, 2012 12:20am

    onedogmedia

    31 posts

    Thanks for trying.  I think it had something to do with my fuddled attempt at setting the paths at the wrong time, and it just corrupted the database somehow.  The hosting company rolled back to an earlier database, and the site works fine now.  So, had to redo a couple days worth of modifications but at least there is a site!

    Thanks again.

  • #7 / Nov 12, 2012 10:50am

    Shane Eckert

    7174 posts

    Hey there oliversitedesign,

    Thank you for letting us know. I am glad that the site is back up, though having to backtrack a few days does not sound fun.

    If you need anything else, please just let me know by opening a new thread.

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases