"An unexpected error has occurred" after server switch

Author Message

Marco Zinn

Friday 17 July 2009 1:55:08 pm

SOLVED, so for your information:
We move some ez 4-Installations from one Server to some other server.
After doing this (copying all files, dumping and loading the MySQL DB, clearing cache), i was greeted with that very unusefull error-message.

As the some thread ( http://ez.no/developer/forum/install_configuration/an_unexpected_error_has_occurred__1 ) mentions, i found some more information in the error logs later. At first, there was no error log due to wrong permissions in the file system.

Anyway, the reason was simple: I didn't update the DB connection paramters in site.ini.append.
In earlier version, you saw a good error message ("Cannot connect to Database"), when this happened... now, this is gone. Nice :(

After i fixed the DB connection ini settings in the override file, cleared the cache, everything worked like charm.

BTW: When the installation was done with the setup wizard, the DB connection params is not defined in /settings/override/site.ini.append.php (which usually makes sense), but in /settings/siteaccess/<USERSITENAME>/site.ini.append.php and /settings/siteaccess/<ADMINSITENAME>/site.ini.append.php . So, it's duplicate. If you edit them there, don't forget to update them in all siteaccessed. Or simply enter your new DB connection params into /settings/override/site.ini.append.php ,which override the other settings.... and better delete them in the other files, so you wont stumble upon them later.

Hope, this saves some of you some minute or hours time...

Marco
http://www.hyperroad-design.com

Heath

Saturday 18 July 2009 3:20:06 am

Marco,

Checkout this patch. I used it recently to stop being mystified by these kinds of errors recently.

<i>http://lists.ez.no/pipermail/sdk-public/2009-July/002847.html</i>

Cheers,
Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.