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.
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.