Upgrading through the 2.0 Beta Upgrader after a CVS update produces the following error message.
I've looked at:
http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&p=124537#124537
and
http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=27924&highlight=error+errorstoragefailure
'test.php' produces "stdClass Object ()"
Unfortunately I have no access to php.ini so cannot set 'zend.ze1_compatibility_mode MUST == OFF', if it needs changing.
I've also flushed caches and flushed templates.
This problem has only occured today - 30/03/2005. Other CVS upgrades were OK.
BF
----
Stack Trace:
Error (ERROR_STORAGE_FAILURE) : Error trying to load /home/user/account/Gallery2/modules/core/classes/GalleryStorage/../../../../modules/core/classes/GalleryStorage/DatabaseStorage/schema/platform/mysql/GalleryAccessMap.sql
* in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 1720 (gallerystatus::error)
* in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 1524 (mysqldatabasestorage::_executesqlfile)
* in modules/core/classes/GalleryStorage.class at line 338 (mysqldatabasestorage::configurestore)
* in modules/core/classes/GalleryModule.class at line 132 (gallerystorage::configurestore)
* in upgrade/steps/UpgradeCoreModuleStep.class at line 72 (coremodule::installorupgrade)
* in upgrade/index.php at line 151 (upgradecoremodulestep::processrequest)
Debug Output:
(mysql): SHOW TABLES
realpath(/home/user/account/Gallery2/modules/core/classes/../../..)
Binding text domain: modules_core ->
/home/user/account/Gallery2/modules/core/locale
file_exists(/home/user/g2data//versions.dat)
file(/home/user/g2data//versions.dat, )
file_exists(/home/user/account/Gallery2/modules/core/classes/GalleryStorage/../../../../modules/core/classes/GalleryStorage/DatabaseStorage/schema/platform/mysql)
opendir(/home/user/account/Gallery2/modules/core/classes/GalleryStorage/../../../../modules/core/classes/GalleryStorage/DatabaseStorage/schema/platform/mysql)
readdir(Resource id #45)
readdir(Resource id #45)
...
...lots of these...
...
readdir(Resource id #45)
closedir(Resource id #45)
(mysql): SHOW TABLES
(mysql): SELECT g_name, g_major, g_minor FROM g2_Schema
fopen(/home/user/account/Gallery2/modules/core/classes/GalleryStorage/../../../../modules/core/classes/GalleryStorage/DatabaseStorage/schema/platform/mysql/GalleryAccessMap.sql,
r, 0)
feof(Resource id #48)
fgets(Resource id #48, 4096)
feof(Resource id #48)
fgets(Resource id #48, 4096)
feof(Resource id #48)
...
...lots of these...
...
fgets(Resource id #48, 4096)
feof(Resource id #48)
fgets(Resource id #48, 4096)
feof(Resource id #48)
fclose(Resource id #48)
mysql error: [1171: All parts of a PRIMARY KEY must be NOT NULL; If you
need NULL in a key, use UNIQUE instead] in EXECUTE("-- This file was
automatically generated from an XSL template, which is
-- why it looks so ugly. Editing it by hand would be a bad idea.
--
CREATE TABLE g2_AccessMap (
g_accessListId
int(11)
NOT NULL
,
g_userId
int(11)
,
g_groupId
int(11)
,
g_permission
int(11)
NOT NULL
,
PRIMARY KEY (g_accessListId
,
g_userId
,
g_groupId)
,
INDEX (g_accessListId)
,
INDEX (g_userId)
,
INDEX (g_groupId)
,
INDEX (g_permission)
) TYPE=MyISAM")
(mysql): -- This file was automatically generated from an XSL template,
which is
-- why it looks so ugly. Editing it by hand would be a bad idea.
--
CREATE TABLE g2_AccessMap (
g_accessListId
int(11)
NOT NULL
,
g_userId
int(11)
,
g_groupId
int(11)
,
g_permission
int(11)
NOT NULL
,
PRIMARY KEY (g_accessListId
,
g_userId
,
g_groupId)
,
INDEX (g_accessListId)
,
INDEX (g_userId)
,
INDEX (g_groupId)
,
INDEX (g_permission)
) TYPE=MyISAM
1171: All parts of a PRIMARY KEY must be NOT NULL; If you need NULL in a
key, use UNIQUE instead
adodb_mysql._execute(-- This file was
automatically generated from an XSL template, w..., false) % line 833, file: adodb.inc.php
adodb_mysql.execute(-- This file was automatically generated
from an XSL template, w...) % line
1716, file: DatabaseStorage.class
mysqldatabasestorage._executesqlfile(/home/user/account/Gallery2/modules/core/classes/GalleryS...) % line 1524, file: DatabaseStorage.class
mysqldatabasestorage.configurestore(core) % line 338, file: GalleryStorage.class
gallerystorage.configurestore(core) % line 132, file: GalleryModule.class
realpath(/home/user/account/Gallery2/modules/core/classes/../../../)
----
Gallery URL (optional):
Gallery version: 0.9.5 2.0-beta-1+
Webserver (with version): Apache/1.3.27 (Unix)
Datatabase (with version): MySQL 3.23.58
PHP version (eg 4.2.1): 4.3.10
phpinfo URL (optional):
Graphics Toolkit(s):
Operating system:
Web browser/version:
G1 version (for migration bugs):
Posts: 8601
that new table just went into CVS last night.. i haven't even performed this upgrade myself yet. but that does look like a bug.. try again later today from anon CVS or using tomorrow's nightly snapshot.. thanks.
Posts: 8601
ok, fix in cvs... (you'll have to wait a few hours for anon cvs to get it)
since you were the lucky one to find this problem you may have trouble rerunning this upgrade.. what core version were you upgrading from? after your cvsup when you rerun the upgrader if it says upgrading from core module 0.9.4 or older then check your db and see if you have a non-empty g2_MimeTypeMap table.. if so, delete all rows before clicking to start the core upgrade..
Posts: 314
in addition to what mindless is saying you may have to delete a line that relates to g2MimeTypeMap from g2_Schema table as well...
Posts: 8601
no, the upgrader will skip table creation if it sees the table already exists.
Posts: 9
Just done a CVS update and the ugrade appears to have gone OK. I didn't look at g2_MimeTypeMap table as I was on 0.9.5.
Everything appears as it was, only better
versions.dat is now saying:
0.9.6
2.0-beta-1+
Cheers,
Brian
Posts: 83
so what was the fix? which files do i need to replace? i downloaded 03-31-2005 03:36:52 AM build and have the same problem.
thanks!
upgrade: 0.9.3 -->0.9.6
it gives me an error:
(mysql): INSERT INTO 000_MimeTypeMap (000_extension, 000_mimeType,
000_viewable) VALUES ('z', 'application/x-compress', 0)
1062: Duplicate entry 'z' for key 1
Posts: 8601
did you try this?
Posts: 83
yes i did
what else i noticed:
Table GalleryAccessMap: missing entry in Schema table
Table GalleryAccessSubscriberMap: missing entry in Schema table
Table GalleryToolkitOperationMimeTypeMap: missing entry in Schema table
Table GalleryToolkitPropertyMimeTypeMap: missing entry in Schema table
mysql error: [1062: Duplicate entry 'z' for key 1] in EXECUTE("INSERT INTO
000_MimeTypeMap (000_extension, 000_mimeType, 000_viewable) VALUES
('z','application/x-compress',0)")
While "GalleryToolkitOperationMimeTypeMap "and "GalleryToolkitPropertyMimeTypeMap" were deleted by me, i've never seen first two...
Another update:
If after i got this message ( [1062: Duplicate entry 'z' for key 1]) i'd empty "_MimeTypeMap" and then try re-run updater I get Fatal error: Call to a member function on a non-object in .../modules/core/classes/Gallery.class on line 253.
Running updater one more time returns me to the same place i was [1062: Duplicate entry 'z' for key 1]
Posts: 83
How safe (correct) to bypass installer by creating/populating
TkOperatnMimeTypeMap
TkPropertyMimeTypeMap
MimeTypeMap
In "_Schema"
as well as "_MimeTypeMap", then change 0.9.3 to 0.9.6 in g2data/versions.dat
and after logging as admin update all modules?
or i missed something?
+++
something still triggers updater...what could it be?
Posts: 7994
Oops, you shouldn't have deleted the Tk tables! We can probably recover from that, though. Let's try this. Delete the following tables:
TkOperatnMimeTypeMap
TkPropertyMimeTypeMap
MimeTypeMap
AccessMap
AccessSubscriberMap
Remove their entries from the schema table, too.
Edit your PluginParameterMap and change the version for the core plugin to 0.9.3 (browse around till you find the right row there).
Edit g2data/versions.dat and change the first line to 0.9.3 .. make sure that you leave that file so that it's writeable by your webserver!
Then, browse back to the main page and it should trigger the upgrader. Do the complete upgrade; it should complete successfully.
Then, go to the Site Admin page and deactivate all your toolkit modules (ArchiveUpload, Ffmpeg, Gd, ImageMagick, NetPBM, SquareThumb, Thumbnail) and reactivate them. That should fix your Tk tables.
If that doesn't work, let us know
Posts: 1
I tried to fix my g2 installation (after having been stupid enough to delete the AccessMap-table without having made a backup first :oops this way. It was partially succesful: I can now again login and access the Administration page, but unfortunately I cannot see *any* albums. I have the Beta 3 version of g2 installed.
Does anyone know how I can fix this?