G2 Updating failed....

tomcat76
tomcat76's picture

Joined: 2003-04-22
Posts: 133
Posted: Fri, 2005-04-15 07:22

You asked for the debug log when a failed update occured....
Upgrading the core produced....
I've had the odd error before when upgrading but it's always worked, this one seems fatal...:-(
Going to start a fresh.... but thought I would send the log file.
Was updating to the latest release from the previous release...

Stack Trace

Error (ERROR_STORAGE_FAILURE)
in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 1236 (gallerystatus::error)
in modules/core/classes/GalleryStorage.class at line 261 (mysqldatabasestorage::addmapentry)
in modules/core/classes/interfaces/GalleryMimeTypeMap.inc at line 96 (gallerystorage::addmapentry)
in modules/core/classes/helpers/GalleryMimeTypeHelper_simple.class at line 213 (gallerymimetypemap::addmapentry)
in modules/core/CoreModuleExtras.inc at line 343 (gallerymimetypehelper_simple::initializemimetypes)
in modules/core/module.inc at line 515 (coremoduleextras::upgrade)
in modules/core/classes/GalleryModule.class at line 137 (coremodule::upgrade)
in upgrade/steps/UpgradeCoreModuleStep.class at line 72 (coremodule::installorupgrade)
in upgrade/index.php at line 152 (upgradecoremodulestep::processrequest)

Debug Output
(mysql): SHOW TABLES
--------------------------------------------------------------------------------

realpath(/home/furballuk/public_html/gallery2/modules/core/classes/../../..)
Binding text domain: modules_core ->
/home/furballuk/public_html/gallery2/modules/core/locale
file_exists(/home/furballuk/public_html/gallery2/g2data//versions.dat)
file(/home/furballuk/public_html/gallery2/g2data//versions.dat, )
file_exists(/home/furballuk/public_html/gallery2/modules/core/classes/GalleryStorage/../../../../modules/core/classes/GalleryStorage/DatabaseStorage/schema/platform/mysql)
opendir(/home/furballuk/public_html/gallery2/modules/core/classes/GalleryStorage/../../../../modules/core/classes/GalleryStorage/DatabaseStorage/schema/platform/mysql)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
readdir(Resource id #47)
closedir(Resource id #47)
--------------------------------------------------------------------------------
(mysql): SHOW TABLES
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysql): SELECT g_name, g_major, g_minor FROM g2_Schema

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysql): DELETE FROM g2_PluginParameterMap WHERE g_pluginType='modules'
AND g_pluginId='core' AND g_itemId=0 AND
g_parameterName='misc.useShortUrls'
--------------------------------------------------------------------------------

mysql error: [1062: Duplicate entry 'z' for key 1] in EXECUTE("INSERT INTO
g2_MimeTypeMap (g_extension, g_mimeType, g_viewable) VALUES
('z','application/x-compress',0)")

--------------------------------------------------------------------------------
(mysql): INSERT INTO g2_MimeTypeMap (g_extension, g_mimeType,
g_viewable) VALUES ('z', 'application/x-compress', 0)
--------------------------------------------------------------------------------
1062: Duplicate entry 'z' for key 1

adodb_mysql._execute(INSERT INTO
g2_MimeTypeMap (g_extension, g_mimeType, g_viewable)...) % line 818, file: adodb.inc.php
adodb_mysql.execute(INSERT INTO g2_MimeTypeMap
(g_extension, g_mimeType, g_viewable)..., Array[3]) % line 1233, file: DatabaseStorage.class
mysqldatabasestorage.addmapentry(GalleryMimeTypeMap,
Array[3]) % line 261, file: GalleryStorage.class
gallerystorage.addmapentry(GalleryMimeTypeMap,
Array[3]) % line 96, file: GalleryMimeTypeMap.inc
gallerymimetypemap.addmapentry(Array[3]) % line 213, file: GalleryMimeTypeHelper_simple.class

realpath(/home/furballuk/public_html/gallery2/modules/core/classes/../../../)

 
sittingduck

Joined: 2005-04-08
Posts: 19
Posted: Fri, 2005-04-15 09:26

I had the same problem, and fixed by removing all the data with the g2_MimeTypeMap table, by at the data base console using DELETE FROM g2_MimeTypeMap;

Then re-run the upgrade, and it should work

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-04-15 09:30

mindless, this is the 3rd error report of a case of upgrade and the 'z' in the mimetypemap table. already figured out what's wrong?

tomcat76, sorry and thank you.

 
tomcat76
tomcat76's picture

Joined: 2003-04-22
Posts: 133
Posted: Fri, 2005-04-15 09:37
valiant wrote:
mindless, this is the 3rd error report of a case of upgrade and the 'z' in the mimetypemap table. already figured out what's wrong?

tomcat76, sorry and thank you.

That's ok hope it help's, its a bit to tech for me to understand... gallery2 is/was only running as a test to see if I could get to grips with it so no problem if I lose it... going to try a fresh install.

Thanks for the reply.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Fri, 2005-04-15 15:15

valiant, no, no idea why it runs the code to load that table twice. perhaps a previous failed upgrade attempt.