Upgrade problems from 2.0 to 2.2.4

dmartien

Joined: 2005-09-30
Posts: 11
Posted: Thu, 2008-04-10 13:36

I am having trouble with an upgrade from Gallery 2.0 to 2.2.4. I get a lot of database errors. From reading other posts, I understand that database errors are often caused by upgrading from a beta version. But I am at the release version of 2.0.

Based on some of the errors I saw, I added the field g_locked int(1) (default 0) to the g2_User table. (I did this on the db before the upgrade.) Then running the upgrade gives me the attached debug output. My system information is below.

I would greatly appreciate any help! I have backups of my files and database, and can manipulate the database using phpMyAdmin. I think I just need some instructions on what manipulations to run. Thanks!


--------------------------------------------------------
System and Gallery information:
--------------------------------------------------------
Gallery version: 2.0
File integrity: There are some old files
SVN install: No
PHP version: 5.2.5 cgi
PHP memory limit: 32M
PHP disable_functions:
PHP zend.ze1_compatibility_mode: 0
Webserver: Apache/1.3.41 (Unix) mod_log_bytes/1.2 mod_bwlimited/1.4
mod_auth_passthrough/1.8 FrontPage/5.0.2.2635 DAV/1.0.3 mod_ssl/2.8.31
OpenSSL/0.9.7a
Database: mysql 4.1.22-standard
Operating system: Linux esc06.midphase.com 2.6.9-55.0.2.ELsmp #1 SMP
Tue Jun 26 14:30:58 EDT 2007 i686
Browser: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_2; en-us)
AppleWebKit/525.13 (KHTML, like Gecko) Version/3.1 Safari/525.13
--------------------------------------------------------
PHPInfo Link : http://themartiens.com/Gallery/phpinfo.php

AttachmentSize
debug.txt196.04 KB
 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2008-04-10 15:26

please attach all upgrade log files that are located in your g2data folder to your next forum post. please attach them as forum file attachments.
thanks.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
dmartien

Joined: 2005-09-30
Posts: 11
Posted: Fri, 2008-04-11 01:36

I've attached the upgrade logs to this post. The conditions are slightly different for each of these. The one that starts with upgrade_3b9 was performed with no changes to the database. The one that starts with upgrade_da4 was performed after the change described in my previous post.

By the way, I changed the extensions from .log to .txt because the forum didn't like the .log extension.

Thanks a lot for the help!

AttachmentSize
upgrade_da4a4c4bcb.txt370.67 KB
upgrade_9effeb30e1.txt283.99 KB
upgrade_9e2a61012b.txt108.11 KB
upgrade_3b911cef12.txt531.07 KB
 
dmartien

Joined: 2005-09-30
Posts: 11
Posted: Fri, 2008-04-11 01:38

In the last attempt, besides making the database change (adding field g_locked), I also added the directory g2data/sessions/, because I had an error message about the lack of that directory at the top of the Core Module upgrade page.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2008-04-11 12:45

your original problem:

mysql error: [1283: Column 'g_comment' cannot be part of FULLTEXT index] in EXECUTE("ALTER TABLE `g2_Comment` CHANGE `g_host` `g_host` varbinary(128) NOT NULL, CHANGE `g_subject` `g_subject` varbinary(128) NULL, CHANGE `g_comment` `g_comment` blob NULL")

2008-04-08 22:47:27 [TMP_SESSION_ID_DI_NOISSES_PMT] <hr />
(mysql): ALTER TABLE `g2_Comment` CHANGE `g_host` `g_host` varbinary(128) NOT NULL, CHANGE `g_subject` `g_subject` varbinary(128) NULL, CHANGE `g_comment` `g_comment` blob NULL &nbsp; 
<hr />

that's an uncommon error. did you add a fulltext index to your comment table??

so something's wrong with the filesystementity table.

> In the last attempt, besides making the database change (adding field g_locked),

i don't think that helped, pretty sure it made things worse actually. the g_locked error at the top of the upgrade path is expected and ok. other errors aren't.
by adding the column, you'll probably run into another fatal error later in the upgrade path when g2 tries to add that column.

anyhow. this is the error from your 2nd upgrade log:

2008-04-09 08:20:20 [TMP_SESSION_ID_DI_NOISSES_PMT] mysql error: [1054: Unknown column 'g_userId' in 'field list'] in EXECUTE("
		UPDATE
		  g2_AccessMap
		SET
		  g_userOrGroupId = g_userId + g_groupId
		")

that's a common upgrade error when other things went bad before. e.g. when a previous upgrade failed.

the third attempt failed due to the missing sessions/ folder (which you correctly fixed by creating it again) and the forth attempt failed due to the same issue as the first failure (first attempt).

so we're back to the question:
did you ever customize / modify your gallery by adding a fulltext index to one or more of your database tables, specifically the g2_Comment table?

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
dmartien

Joined: 2005-09-30
Posts: 11
Posted: Fri, 2008-04-11 13:53

Thanks for looking over the log files. The fulltext index rings a bell. At some point, my gallery started getting hit by the comment spambots. All of the offending spam had hyperlinks in them, so I just searched for and deleted comments with hyperlinks. I may have created the fulltext index to do that.

I am almost certain I am not using the fulltext index for anything now. Should I just delete the fulltext index and try again?

Thanks again!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2008-04-11 13:57

> Should I just delete the fulltext index and try again?

yes, please restore your database backup, remove the fulltext indices, recreate the sessions folder and try to upgrade again.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
dmartien

Joined: 2005-09-30
Posts: 11
Posted: Sat, 2008-04-12 02:24

Yesss! That worked. Thanks so much for the help. And sorry it was a silly mistake on my part. I should have undone my db mucking earlier.

 
lutin

Joined: 2008-04-15
Posts: 2
Posted: Tue, 2008-04-15 08:30

Hi, I intended to upgrade from 2.0.4 to 2.1.2 (or to 2.2.4).
My way to do it is to
1) rename the original gallery folder as gallery2_backup
2) download the new version and copy the new "gallery2" folder to my directory.
3) copy old config.php file into the new gallery2 folder
4) link to the index..
5) then I saw the following error message....

<originally my version was 2.0.1; I successfully upgrated it to 2.0.4,, but not for newer version>

sorry that I am a newcomer and i am not quite sure how to generate the debug txt to attatch here.

If anyone could help me.
Many thanks.

A school website mantainer from Taiwan.

==
Gallery version = 2.0.4 core: 1.0.0.4
PHP = 4.3.4 apache
server = Apache/1.3.29 (Win32) PHP/4.3.4
database = mysql 4.0.16-nt
tool = Exif, Thumbnail, Gd
os = Windows NT WEBLOG145 5.2 build 3790
browser = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322)

===

Error
Error (ERROR_STORAGE_FAILURE) :
in modules\core\classes\GalleryStorage.class at line 624 (gallerycoreapi::error)
in modules\core\classes\GalleryCoreApi.class at line 2800 (mysqlstorage::getmapentry)
in modules\core\classes\GallerySession.class at line 851 (gallerycoreapi::getmapentry)
in modules\core\classes\GallerySession.class at line 231 (gallerysession::_loadsessiondata)
in modules\core\classes\Gallery.class at line 287 (gallerysession::init)
in init.inc at line 118 (gallery::initsession)
in main.php at line 76

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2008-04-15 11:45

@lutin:

please create a new forum topic to discuss your case.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage