[SOLVED] Beta1 to Beta 2 upgrade error

Sc0uT

Joined: 2005-04-18
Posts: 5
Posted: Mon, 2005-04-18 17:14

Hi all,
I'm trying to upgrade G2 Beta1 to Beta2, but I get this error:

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(/home2/gracanic/public_html/slike/modules/core/classes/../../..)
Binding text domain: modules_core ->
/home2/gracanic/public_html/slike/modules/core/locale
file_exists(/home2/gracanic/g2data//versions.dat)
file(/home2/gracanic/g2data//versions.dat, )
file_exists(/home2/gracanic/public_html/slike/modules/core/classes/GalleryStorage/../../../../modules/core/classes/GalleryStorage/DatabaseStorage/schema/platform/mysql)
opendir(/home2/gracanic/public_html/slike/modules/core/classes/GalleryStorage/../../../../modules/core/classes/GalleryStorage/DatabaseStorage/schema/platform/mysql)

and so on...

I've unpacked gallery .tgz on server, and server is running on Cent OS 3.4, Apache 1.3.33, PHP 4.3.11, MySQL 4.0.23.

Does anyone know what could be wrong?
----

Gallery URL (optional):
Gallery version: G2 Beta1
Webserver (with version): Apache 1.3.33
Datatabase (with version): mysql 4.0.23
PHP version (eg 4.2.1): 4.3.11
phpinfo URL (optional):
Graphics Toolkit(s):
Operating system: Linux CentOS 3.4
Web browser/version: Konqueror 3.4
G1 version (for migration bugs):

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-04-18 17:22

looks like the common mimetypemap error.
the "and so on..." isn't very informative. could you post the complete error, even if it's a little long?
try deleting the entry
g_extension g_mimeType g_viewable =
Bearbeiten Löschen z application/x-compress 0
in your database table g2_MimeTypeMap and try again.

 
Sc0uT

Joined: 2005-04-18
Posts: 5
Posted: Mon, 2005-04-18 17:54

I've tried to delete entries you mentioned, but again got an error, now here's the full output

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(/home2/gracanic/public_html/slike/modules/core/classes/../../..)
Binding text domain: modules_core ->
/home2/gracanic/public_html/slike/modules/core/locale
file_exists(/home2/gracanic/g2data//versions.dat)
file(/home2/gracanic/g2data//versions.dat, )
file_exists(/home2/gracanic/public_html/slike/modules/core/classes/GalleryStorage/../../../../modules/core/classes/GalleryStorage/DatabaseStorage/schema/platform/mysql)
opendir(/home2/gracanic/public_html/slike/modules/core/classes/GalleryStorage/../../../../modules/core/classes/GalleryStorage/DatabaseStorage/schema/platform/mysql)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
closedir(Resource id #46)


(mysql): SHOW TABLES   





(mysql): SELECT gx21_name,  gx21_major,  gx21_minor FROM g2x_Schema  






(mysql): DELETE FROM g2x_PluginParameterMap WHERE
gx21_pluginType='modules' AND gx21_pluginId='core' AND gx21_itemId=0 AND
gx21_parameterName='misc.useShortUrls'   



mysql error: [1054: Unknown column 'gx21_extension' in 'field list'] in
EXECUTE("INSERT INTO g2x_MimeTypeMap (gx21_extension, gx21_mimeType,
gx21_viewable) VALUES ('z','application/x-compress',0)")



(mysql): INSERT INTO g2x_MimeTypeMap (gx21_extension,  gx21_mimeType, 
gx21_viewable) VALUES ('z', 'application/x-compress', 0)  



1054: Unknown column 'gx21_extension' in 'field list'


                     
  adodb_mysql._execute(INSERT INTO
g2x_MimeTypeMap (gx21_extension, gx21_mimeType, gx21...) % line  818, file: adodb.inc.php
                     adodb_mysql.execute(INSERT INTO g2x_MimeTypeMap
(gx21_extension, gx21_mimeType, gx21..., 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(/home2/gracanic/public_html/slike/modules/core/classes/../../../)

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2005-04-18 18:36

what is the structure of your g2x_MimeTypeMap table?
(desc g2x_MimeTypeMap)

 
Sc0uT

Joined: 2005-04-18
Posts: 5
Posted: Mon, 2005-04-18 18:53

Right now it's:

gx21_extension` varchar(32) NOT NULL default '',
  `gx21_mimeType` varchar(32) NOT NULL default '',
  `gx21_viewable` int(1) default NULL,
  PRIMARY KEY  (`gx21_extension`)

(right now gallery database is restored from backup, but when I tried this second upgrade I've deleted some data from that table, as valiant said...)

 
Sc0uT

Joined: 2005-04-18
Posts: 5
Posted: Mon, 2005-04-18 19:02

Sorry, I've messed up with deletion of data in g2_MimeTypeMap table, I've tried another upgrade after restored backup of db, and here's the full error info:

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(/home2/gracanic/public_html/slike/modules/core/classes/../../..)
Binding text domain: modules_core ->
/home2/gracanic/public_html/slike/modules/core/locale
file_exists(/home2/gracanic/g2data//versions.dat)
file(/home2/gracanic/g2data//versions.dat, )
file_exists(/home2/gracanic/public_html/slike/modules/core/classes/GalleryStorage/../../../../modules/core/classes/GalleryStorage/DatabaseStorage/schema/platform/mysql)
opendir(/home2/gracanic/public_html/slike/modules/core/classes/GalleryStorage/../../../../modules/core/classes/GalleryStorage/DatabaseStorage/schema/platform/mysql)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
readdir(Resource id #46)
closedir(Resource id #46)


(mysql): SHOW TABLES   





(mysql): SELECT gx21_name,  gx21_major,  gx21_minor FROM g2x_Schema  






(mysql): DELETE FROM g2x_PluginParameterMap WHERE
gx21_pluginType='modules' AND gx21_pluginId='core' AND gx21_itemId=0 AND
gx21_parameterName='misc.useShortUrls'   





(mysql): INSERT INTO g2x_MimeTypeMap (gx21_extension,  gx21_mimeType, 
gx21_viewable) VALUES ('z', 'application/x-compress', 0)  




mysql error: [1062: Duplicate entry 'ai' for key 1] in EXECUTE("INSERT INTO
g2x_MimeTypeMap (gx21_extension, gx21_mimeType, gx21_viewable) VALUES
('ai','application/postscript',0)")



(mysql): INSERT INTO g2x_MimeTypeMap (gx21_extension,  gx21_mimeType, 
gx21_viewable) VALUES ('ai', 'application/postscript', 0)  



1062: Duplicate entry 'ai' for key 1


                     
  adodb_mysql._execute(INSERT INTO
g2x_MimeTypeMap (gx21_extension, gx21_mimeType, gx21...) % line  818, file: adodb.inc.php
                     adodb_mysql.execute(INSERT INTO g2x_MimeTypeMap
(gx21_extension, gx21_mimeType, gx21..., 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(/home2/gracanic/public_html/slike/modules/core/classes/../../../)
 
Sc0uT

Joined: 2005-04-18
Posts: 5
Posted: Mon, 2005-04-18 21:46

Solved, I emptied table g2_MimeTypeMap, and upgrade went without any problems...

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Thu, 2005-04-21 05:15

Not sure what is causing this, but I added some code to GalleryMimeTypeHelper_simple::initializeMimeTypes() to empty the map before initializing so that should resolve this problem (and maybe later we'll figure out the root cause).