We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Migrated v2 site won't load: no preferences found / charset unknown

How Do I?

chris thacker's avatar
chris thacker
119 posts
4 years ago
chris thacker's avatar chris thacker

I copied an EE 2 installation (mysql 5.5, php 5.6) to a local virtual server to try to test upgrading EE to v6.

My test vm is running mysql 8 and php 5.6, for the initial configuration, until I get the v2 site working. I put the EE files in place, imported the db, and changed file permissions.

When I try to load the site I get this error:

> An Error Was Encountered > Site Error: Unable to Load Site Preferences; No Preferences Found

I don’t think it’s a simple IIS file permission problem though.

I added this to the end of the database.php file per a suggestion here:

echo '<pre>';
  print_r($db['default']);
  echo '</pre>

<p>’;</p>

<p>echo ‘Connecting to database: ’ .$db[’default’][’database’];
  $dbh=mysql_connect
  (
    $db[’default’][’hostname’],
    $db[’default’][’username’],
    $db[’default’][’password’])
    or die(‘Cannot connect to the database because: ’ . mysql_error());
    mysql_select_db ($db[’default’][’database’]);</p>

<pre><code>echo '

Connected OK:’ ; die( ‘file: ’ .FILE . ’ Line: ’ .LINE);</pre>

and the error changes to:

> Connecting to database: Cannot connect to the database because: Server sent charset unknown to the client.

I’ve already spent most of my evening troubleshooting this and am hoping I’m missing something simple. What could be causing this?

The db collation is utf8_general in mysql and set for the same in database.php.

       
chris thacker's avatar
chris thacker
119 posts
4 years ago
chris thacker's avatar chris thacker

I switched the site over to php 7, then verified a bunch of settings and got it to work although the errors caused the page to load in a way that was ugly. I was able to access the control panel and uninstall a couple of incompatible extensions.

I did have to change the db connection setting in database.php. In case it helps anyone troubleshoot, you can change the ‘debug’ flag from 0 to 1 in index.php or admin.php to get more information.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.