[SOLVED] upgrade error from G2 0.8 to 0.9.10

rtwickn

Joined: 2005-04-28
Posts: 6
Posted: Thu, 2005-04-28 14:18

Hi,
I had G2 0.8 installed and was working great. This morning when I try to visit my album, I'm automatically taken to update page and on step 3, I'm receiving this error. debug info that I think is causing problem is below

Any help is greatly appreciated.
Regards
-R'twick

An error ocurred while upgrading Gallery Core Module
Something went wrong when we tried to upgrade the core module. In the boxes below you can find some debug information. Report this in the Gallery Forums and we'll help you diagnose the problem. 

Stack Trace: 
Error (ERROR_STORAGE_FAILURE)
in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 1190 (gallerystatus::error) 
in modules/core/classes/GalleryStorage.class at line 241 (mysqldatabasestorage::execute) 
in modules/core/CoreModuleExtras.inc at line 309 (gallerystorage::execute) 
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) 

here's last part of debug info

mysql error: [1051: Unknown table 'g2_ItemPropertiesMap'] in EXECUTE("DROP
TABLE g2_ItemPropertiesMap")

--------------------------------------------------------------------------------
(mysql): DROP TABLE g2_ItemPropertiesMap   
--------------------------------------------------------------------------------
1051: Unknown table 'g2_ItemPropertiesMap'
                  adodb_mysql._execute(DROP TABLE
g2_ItemPropertiesMap, false) % line 
833, file: adodb.inc.php
               adodb_mysql.execute(DROP TABLE g2_ItemPropertiesMap,
Array[0]) % line 1184, file: DatabaseStorage.class
            mysqldatabasestorage.execute(DROP TABLE
[GalleryItemPropertiesMap], Array[0]) %
line  241, file: GalleryStorage.class
         gallerystorage.execute(DROP TABLE
[GalleryItemPropertiesMap]) % line 
309, file: CoreModuleExtras.inc
      coremoduleextras.upgrade(Object:coremodule, null,
Object:statustemplate) % line  515,
file: module.inc

realpath(/home/httpd/vhosts/utkalika.net/subdomains/album/httpdocs/modules/core/classes/../../../)
      

----

Gallery URL (optional):http://album.utkalika.net
Gallery version: 0.8
Webserver (with version): Apache 2.0.46
Datatabase (with version): mysql 3.23.58
PHP version (eg 4.2.1): 4.3.11
phpinfo URL (optional):
Graphics Toolkit(s): netpbm/ImageMagik/gd
Operating system:CentOS 3.4
Web browser/version: All
G1 version (for migration bugs):

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-04-28 14:30

rtwickn, 1. upgrading G2 was introduced for G2 versions 0.8.4 (alpha 4) and higher. 0.8 Is too old, sorry (but we told you so in the announcements, readmes,...).

Whatsoever, I can fix the error you get there. But i guess you will get a lot more errors which can't be solved that easily.
However, let's give it a short shot:

create a table "g2_ItemPropertiesMap" in your g2 database manually. it doesn't have to have any meaningful columns. it will be dropped anyway. then run the upgrader again.

 
rtwickn

Joined: 2005-04-28
Posts: 6
Posted: Thu, 2005-04-28 14:36

Sorry Valian,
but I have no idea how to disable the upgrade. when I try to visit the page, it automatically takes me to the upgrade page. Any way to disable it?

Also, I'm sorry I didn't do some reaserch on it before, but after posting did a search and found the solution to create the table. When I did that,
got errors saying duplicate key in g2_MimeTypeMap. Deleted all records from it and now got a new error

mysql error: [1146: Table 'utkalika_gallery2.g2_PermissionMap' doesn't
exist] in EXECUTE("
            SELECT
              COUNT(DISTINCT g2_PermissionMap.g_itemId)
            FROM
              g2_PermissionMap
             LIMIT 1")

--------------------------------------------------------------------------------
(mysql): 
            SELECT
              COUNT(DISTINCT g2_PermissionMap.g_itemId)
            FROM
              g2_PermissionMap
             LIMIT 1   
--------------------------------------------------------------------------------
1146: Table 'utkalika_gallery2.g2_PermissionMap' doesn't exist
                     
  adodb_mysql._execute(
            SELECT
              COUNT(DISTINCT g2_PermissionMa..., false) % line  833, file: adodb.inc.php
                     adodb_mysql.execute(
            SELECT
              COUNT(DISTINCT g2_PermissionMa..., Array[0]) % line  452, file: adodb-mysql.inc.php
                  adodb_mysql.selectlimit(
            SELECT
              COUNT(DISTINCT g2_PermissionMa..., 1, -1,
Array[0]) % line 1152, file: DatabaseStorage.class
               mysqldatabasestorage.search(
            SELECT
              COUNT(DISTINCT [GalleryPermiss..., Array[0],
Array[1]) % line  220, file: GalleryStorage.class
            gallerystorage.search(
            SELECT
              COUNT(DISTINCT [GalleryPermiss..., Array[0],
Array[1]) % line  206, file: Gallery.class

realpath(/home/httpd/vhosts/utkalika.net/subdomains/album/httpdocs/modules/core/classes/../../../)

any more pointers?

another question: is it possible to create a new installation and import data from my existing album (all pictures and user details) ?

thanks for your help
-R'twick

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-04-28 14:46

- we point out that you should backup before you upgrade. once you started an upgrade and it fails, we can't get back without using the backup.
- import from G2 into G2 isn't available, sorry. (and if it was, we'd require same versions or something like that)

So it looks like you have to make a new install of beta 2 and add all your data again. I'm sorry for that, but during early development (as alpha 1,2,3), we can't spend too much time for the upgrade path. These versions were not intended for productive sites anyway. However, since alpha 4, upgrading is supported.

That to say: i can't think of an easy way to get your upgrade to work.

 
rtwickn

Joined: 2005-04-28
Posts: 6
Posted: Thu, 2005-04-28 14:56

thanks I'll do that and try to migrate manually (mostly if I can move user info) I'll be fine. just don't want to tell all users to register again. Hopefully that will not be much difficlt.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-04-28 15:07

you could create users etc. create items with these users. and if you are using the current nightly snapshot of G2, your users could use the "forgot password" function to set a new password.

 
rtwickn

Joined: 2005-04-28
Posts: 6
Posted: Fri, 2005-04-29 04:47

i just installed the latest snapshot (04-29) but couldn't find the forgot password link anywhere. Is this something I have to install separately?

 
rtwickn

Joined: 2005-04-28
Posts: 6
Posted: Fri, 2005-04-29 05:19

now getting error

[client 207.172.195.228] PHP Notice:  Undefined index:  show in /home/httpd/vhosts/gallery2/g2data/smarty/templates_c/%%1038451378/%%21^21B^21B11A4A%%UserAdmin.tpl.php on line 50, referer: http://album.utkalika.net/main.php?g2_view=core:UserAdmin&g2_subView=core:UserLogin&g2_return=http%3A%2F%2Falbum.utkalika.net%2Fmain.php&g2_returnName=album
 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-04-29 09:58

rtwickn, there's a notice in the readme. when upgrading, flush your PHPA cache, the memory and the filesystem cache.

 
trungdong

Joined: 2003-08-22
Posts: 22
Posted: Sat, 2005-04-30 08:48

My gallery2 core version is 0.8.11. I just wonder if it's safe to upgrade it to the latest build or I should upgrade it to some intermediate version first.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2005-04-30 09:53

0.8.11 > 0.8.4. so yes, it should be safe.

but as akways when upgrading: it's a good idea to backup your complete g2 (g2data, gallery2 , database) before you start the upgrade.

 
trungdong

Joined: 2003-08-22
Posts: 22
Posted: Sat, 2005-04-30 11:57

Thank you for your advice!

Got this error when updating though: http://72.29.77.48/~donght/error.htm
Any suggestions?
Glad I did backup the database.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2005-04-30 12:06

trungdong, a few questions:
- so you upgraded from 0.8.11 to what? g2 beta 2 or a more recent nightly snapshot?
- did you hit refresh/back in the browser or did this happen on the first try?
- could you fill out the support template (g2 version, webserver, mysql, php, ..)?

thanks

 
trungdong

Joined: 2003-08-22
Posts: 22
Posted: Sat, 2005-04-30 13:02
valiant wrote:
- so you upgraded from 0.8.11 to what? g2 beta 2 or a more recent nightly snapshot?

I upgraded my gallery from 0.8.11 to 0.9.14 (from the nightly snapshot dated 29/04)

valiant wrote:
- did you hit refresh/back in the browser or did this happen on the first try?

I didn't use the refrest/back button. It happens every time I restore the database and try to update it.

valiant wrote:
- could you fill out the support template (g2 version, webserver, mysql, php, ..)?

+ g2 version: 0.8.11
+ webserver: Apache/1.3.33 (Unix) mod_gzip/1.3.26.1a mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.3.11 FrontPage/5.0.2.2634a mod_ssl/2.8.22 OpenSSL/0.9.7a
+ mySql: 3.23.49

valiant wrote:
thanks

Thank you!

 
rtwickn

Joined: 2005-04-28
Posts: 6
Posted: Sat, 2005-04-30 17:27

I have installed the latest cvs code as well as the nightly snapshot (for 04/29) but I can't see the password recover feature. Is there any place I have to enable it?

EDIT: never mind. It was the cache in my browser. As soon as I changed browser got the link.
thanks

 
trungdong

Joined: 2003-08-22
Posts: 22
Posted: Sat, 2005-04-30 22:10

Any suggestion for my upgrading problem anyone?

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2005-05-01 01:08

trungdong, does this problem happen when you upgrade again from your backup? When you restore to your backup, make sure that the g2_AccessSubscriberMap table is gone (or at least empty).

 
trungdong

Joined: 2003-08-22
Posts: 22
Posted: Sun, 2005-05-01 21:02

I restored a good copy of my gallery2, upgraded it to beta1, then beta2, then the latest CVS version. It works fine now. Thank you all for your kind help!