getting this message when I try to login to the cp: Your system folder path does not appear to be set correctly. Please open the following file and correct this: admin.php
yahtzeen.com is the main site
ralphscorner.com is second msm site
donk3y is the system folder
previous to the upgrade the CP was working fine but yahtzeen.com was not viewable. ralphscorner.com was working fine.
so in my infinite wisdom I thought “oh I should upgrade my EE install”.
attached is the index and admin files of the yahtzeen.com directory and the directory structure.
am I overlooking a simple mistake or did I totally destroy my sites?
So going from 2 to 7 can be rather a lot! I usually try to go from 2->lastest 2->3. And then I may go 3->7. But it’s also fun to just charge full speed ahead sometimes, so we can likely make it work.
You’ve - got a backup of the database from before you started- yes? If so, then worst case, redo it the slow way.
What version of PHP are you running? at least 7.0, yes? You’ll want that- 7.4+ preferable.
OK- all that in place, you can work through this.
‘Unable to Load Site Preferences from the Database’ - is that frontend and backend? On the frontend, could just be you have the site name wrong in your index.php file- if you replaced those and you’ve got msm, it’s possible. Here’s what’s failing:
public function site_prefs($site_name, $site_id = 1, $mutating = true)
{
// ee()->config is loaded before ee()->db, but the site_prefs() all happens after ee()->db
// is loaded, so we do this check here instead of in _initialize().
if (! array_key_exists('multiple_sites_enabled', $this->default_ini) && ee()->db->table_exists('config')) {
$msm = ee('Model')->get('Config')
->filter('site_id', 0)
->filter('key', 'multiple_sites_enabled')
->first();
if ($msm) {
$this->default_ini[$msm->key] = $msm->value;
}
}
if (! isset($this->default_ini['multiple_sites_enabled']) or $this->default_ini['multiple_sites_enabled'] != 'y') {
$site_name = '';
$site_id = 1;
}
if ($site_name != '') {
$query = ee()->db->get_where('sites', array('site_name' => $site_name));
} else {
$query = ee()->db->get_where('sites', array('site_id' => $site_id));
}
if (empty($query) or $query->num_rows() == 0) {
if ($site_name == '' && $site_id != 1) {
$this->site_prefs('', 1);
return;
}
show_error("Site Error: Unable to Load Site Preferences from the Database; No Preferences Found", 503);
}It’s trying to query the exp_sites table and pull back the preferrences for the correct site. If you have a site name set- check your index.php page your admin.php page and your config.php - it’s going to use that. Look in your database- do you have that all matched up? If you don’t have a site name, it’s going to default to site_id 1. Try and sort that out.
Couple of things that will also be a big help.
1 just set errors to show to everyone- I’d just go to your index.php and change:
$debug = 1;Same in admin.php. Basically- you want to see the errors.
And- I’d turn on error logging.
In system/user/config/config.php add:
$config['log_threshold'] = '1';
$config['log_date_format'] = 'Y-m-d H:i:s';And make a writable folder in system/user called ‘logs’.
Those will help see what’s going on.
And if you get really stuck? This would be a good case for getting on a support plan- you can just sign up and then cancel and have it the full month.
But it’s all nothing that can’t be fixed. Hopefully with a backup database, though!
Lot of great stuff from Robin :D
Right off the bat, i’d check the config file and confirm your database connection details are accurate… As Robin said, you may need to jump PHP versions as well
Few other thoughts on this front.
$config['allow_extensions'] = 'n';Cheers!
-Tom Jaeger
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.