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

eZ debug

Timing: Jan 31 2025 03:35:37
Script start
Timing: Jan 31 2025 03:35:37
Module start 'layout'
Timing: Jan 31 2025 03:35:37
Module start 'content'
Timing: Jan 31 2025 03:35:37
Module end 'content'
Timing: Jan 31 2025 03:35:37
Script end

Main resources:

Total runtime0.0203 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0045 588.3828151.2422
Module start 'layout' 0.00450.0030 739.6250220.7500
Module start 'content' 0.00750.0113 960.3750997.8672
Module end 'content' 0.01880.0014 1,958.242233.9922
Script end 0.0203  1,992.2344 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002612.5751140.0002
Check MTime0.00115.2186140.0001
Mysql Total
Database connection0.00073.248710.0007
Mysqli_queries0.00209.895330.0007
Looping result0.00000.040010.0000
Template Total0.00115.210.0011
Template load0.00083.875110.0008
Template processing0.00031.311710.0003
Override
Cache load0.00062.716210.0006
General
dbfile0.00125.807480.0001
String conversion0.00000.028240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs