Gallery URL : tnis.uk.net
Gallery version: ? not sure as I cannot access the gallery whilst it is trying to upgrade itself ?
Apache version: ?
PHP version 4
Apologies if this is in the wrong forum but I am unable to determine which version of gallery we are running.
Yesterday our gallery decided to upgrade itself but the upgrade/index.php file had been hacked previously so I downloaded a copy of gallery 2.3 and uploaded the contents of the html folder to the live system.
Having spoken with our host, they advised that some of the paths have been hard coded so are incorrect and should be :
/home/71021/domains/tnis.uk.net/
rather than
/nfs/c05/h02/mnt/71021/domains/tnis.uk.net/
This is because their system automatically moves hosting accounts to alternative physical locations if they are using too much resource. I did a search and replace on the path in all files in the 'html' folder which worked and now, I can run the upgrade process and get to step 4 but then I get the following message at the top of the screen :
Notice: Undefined variable: versions in /nfs/c05/h02/mnt/71021/domains/tnis.uk.net/html/modules/core/module.inc on line 548
It seems like the full path still exists somewhere but I am unable to find it - please help!
Thanks
Posts: 16
in addition to the above - this is the debug output from the upgrade process :
file_exists(/home/71021/domains/tnis.uk.net/g2data_aab41b5203/versions.dat)
file(/home/71021/domains/tnis.uk.net/g2data_aab41b5203/versions.dat, )
Unknown module version 0.8 in prepareConfigUpgrade()
is_writeable(/nfs/c05/h02/mnt/71021/domains/tnis.uk.net/html/config.php)
--------------------------------------------------------
Upgrade Core Module
--------------------------------------------------------
--------------------------------------------------------
System and Gallery information:
--------------------------------------------------------
Gallery version: 2.0-alpha-3
File integrity: There are missing/modified files!
SVN install: No
PHP version: 4.4.9 cgi-fcgi
PHP memory limit: 99M
PHP disable_functions:
PHP zend.ze1_compatibility_mode:
Webserver: Apache/2.0.54
Database: mysqlt 5.1.55-rel12.6
Operating system: Linux n22 2.6.33.1mtv4 #1 SMP Fri Apr 8 10:06:54 PDT
2011 i686
Browser: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101
Firefox/5.0
--------------------------------------------------------
Posts: 7892
WOW!, thats an old version
if you can upgrade from there, you will have to do it incrementally.
2.0-alpha-3 -> 2.0 -> 2.1 -> 2.2.6 -> 2.3.1
backing up each step along the way.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 16
Oh!!!
Thanks for the reply, although, when I try to download v2.0 I cannot find the files?
2.2.6 seems to be the earlist on the site?
could you suggest where I might find the older versions?
Posts: 1555
Unfortunately, for reasons I don't fully know, you are correct that all versions of G2 earlier than 2.2.6 appear to have been wiped off the face of the earth. I thought SourceForge was there to saveguard stuff but perhaps something wnet wrong there.
You can try to upgrade to 2.2.6 directly.
Back everything up first.
--
dakanji.com
Posts: 7892
Kevin has them for download here.
he may even have a version of 2.0 somewhere too.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 16
Thanks - much appreciated!
Although.. when I upload the 2.1 files and run the upgrade script I get the following (below) any ideas?
------------------------------------------------
Upgrading the Gallery Core Module
The Gallery Core Module is the heart of the Gallery application. You can upgrade most other modules using the Site Administration interface, but this module must be handled separately in order for the upgrade to go smoothly.
Currently installed 0.8
New version 1.1.0.2
Your upgrade cannot begin because some of your active modules/themes are incompatible or missing. You must either locate more recent versions of these modules or themes, or revert to your original version of Gallery. No changes have been made so it's safe to revert. If you have many incompatible modules listed below, it's possible that you downloaded a smaller distribution of Gallery than what you originally installed. You can download a larger distribution from the Gallery website.
Module digibug is incompatible
Module dynamicalbum is incompatible
Module ecard is incompatible
Module flashvideo is incompatible
Module httpauth is incompatible
Module itemadd is incompatible
Module jpegtran is incompatible
Module keyalbum is incompatible
Module notification is incompatible
Module replica is incompatible
Module snapgalaxy is incompatible
Download replacement modules from the Gallery website
------------------------------------------------
Posts: 7892
when you originally tried to update to 2.3 you uploaded those modules which won't work w/2.1
just remove them and try again.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 16
Do you mean I have to delete the relevant folder from within the 'modules' folder?
I tried this and I still get the same message..
Posts: 7892
You removed them? or renamed them? Gallery will still see them if you renamed them.
Also if there are 2.1 versions of any of those modules to have them in place.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 7892
I don't see any of those modules in the 2.1 module list
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 16
yeah, I deleted them so they are no longer there.. is it possible my gallery thinks it is a different version than it really is?
Posts: 7892
if they are not there, gallery cannot complain about them.
delete everything in g2data/cache/module
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 16
OK, done that - now I get a slightly different set of messages saying the modules are missing rather than incompatible :
Module digibug is missing
Module dynamicalbum is missing
Module ecard is missing
Module flashvideo is missing
Module httpauth is missing
Module itemadd is missing
Module jpegtran is missing
Module keyalbum is missing
Module notification is missing
Module replica is missing
Module snapgalaxy is missing
Are these modules required? if not, any idea where they are referred to?
Posts: 7892
they are not required, in fact they did not even exist back in the 2.1 era
I don't know where gallery is getting that info, must be cached somewhere.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 7892
this may be a solution:
it may take a bit of work, but upgrading from an early alpha at this stage will be work any way you slice it.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 16
OK, having done this and retrying the upgrade I did manage to get a little further!
But.. you guessed it..
Look to me like I am missing database table g2_PermissionMap
Although I do have a table called g2_PermissionSetMap - not sure if this is the same??
stack trace
-------------------------------------------
Error (ERROR_STORAGE_FAILURE)
in modules/core/classes/GalleryStorage.class at line 476 (gallerycoreapi::error)
in modules/core/classes/Gallery.class at line 223 (mysqlstorage::search)
in modules/core/CoreModuleExtras.inc at line 548 (gallery::search)
in modules/core/module.inc at line 487 (coremoduleextras::upgrade)
in modules/core/classes/GalleryModule.class at line 157 (coremodule::upgrade)
in upgrade/steps/UpgradeCoreModuleStep.class at line 83 (coremodule::installorupgrade)
in upgrade/index.php at line 221 (upgradecoremodulestep::processrequest)
--------------------------------------------
and this is the bottom of the debug output
-------------------------------------------
1146: Table 'db71021_photo_browser.g2_PermissionMap' doesn't exist
adodb_mysqlt._execute(
SELECT
COUNT(DISTINCT g2_PermissionMap.g_itemId)
FROM
g2_PermissionMap
LIMIT 1, false) % line 855,
file: adodb.inc.php
adodb_mysqlt.execute(
SELECT
COUNT(DISTINCT g2_PermissionMap.g_itemId)
FROM
g2_PermissionMap
LIMIT 1, Array[0]) % line 479,
file: adodb-mysql.inc.php
adodb_mysqlt.selectlimit(
SELECT
COUNT(DISTINCT g2_PermissionMap.g_itemId)
FROM
g2_PermissionMap
, 1, -1, Array[0]) % line 465,
file: GalleryStorage.class
mysqlstorage.search(
SELECT
COUNT(DISTINCT [GalleryPermissionMap::itemId])
FROM
[GalleryPermissionMap]
, Array[0], Array[1]) % line 223,
file: Gallery.class
gallery.search(
SELECT
COUNT(DISTINCT [GalleryPermissionMap::itemId])
FROM
[GalleryPermissionMap]
, Array[0], Array[1]) % line 548,
file: CoreModuleExtras.inc
realpath(/nfs/c05/h02/mnt/71021/domains/tnis.uk.net/html/modules/core/classes/../../../)
Error: Failed to upgrade the core module, this is the error stack trace:
Error (ERROR_STORAGE_FAILURE)in
modules/core/classes/GalleryStorage.class at line 476
(gallerycoreapi::error)
in modules/core/classes/Gallery.class at line 223
(mysqlstorage::search)
in modules/core/CoreModuleExtras.inc at line 548
(gallery::search)
in modules/core/module.inc at line 487
(coremoduleextras::upgrade)
in modules/core/classes/GalleryModule.class at line 157
(coremodule::upgrade)
in upgrade/steps/UpgradeCoreModuleStep.class at line 83
(coremodule::installorupgrade)
in upgrade/index.php at line 221
(upgradecoremodulestep::processrequest)
realpath(/nfs/c05/h02/mnt/71021/domains/tnis.uk.net/html/modules/core/classes/../../../)
-------------------------------------------
Posts: 7892
Not the same.
See, this is where the missing 2.0 final may have created this table.
Lemme query Kevin and see if he has a 2.0 release.
You really should not have waited this long to upgrade.
Does your gallery have many images?
You can do an import into 2.3.1 via the serverAdd method.
You will keep the directory/Album structure but lose titles, descriptions, comments...
I'll have Kevin peek into this thread.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 16503
Gallery version: 2.0-alpha-3
File integrity: There are missing/modified files!
Did you really have such an old version of G2? The upgrader will throw that error if you're missing versions.dat (located in your g2data directory) or it can't read it. Gallery will also "decide to upgrade itself" if that same file gets deleted or becomes un-readable. I'm betting this is what happened.
Please tell us you made a backup before you started anything.
____________________________________________
Like Gallery? Like the support? Donate now!
Posts: 16
Unfortunately, this gallery has been online for a fair while with a LOT of images on it (30 companies worth!)
I inherited this last year when I joined the company but the guy who implemented it is long gone.. believe me, this is just a needle in the haystack of problems I have encountered since!
This is the response from our host (Media Temple) when I asked for a backup to recover from :
..not what I needed to hear!
So looks like I have no option but to proceed with your suggestions (of which I am hugely grateful of btw!)..
Should I try the 2.3.1 upgrade? Are there any other possibilities without losing the image titles? we rely on these as a reference to our offline database of print images!
Thanks again
mike
Posts: 16
I'm really not sure which version the gallery was before - I was relying on the output from the upgrade script as guidance as I could not access it once the upgrade process had started.
I do have a versions.dat file in g2data_aab41b5203 but it is empty.. not sure if this is indicative of what may have happened?
Posts: 7892
As nivekiam suggests is there a versions.dat in your g2data? what are the contents?
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 16
I did take a backup of the database before I attempted the upgrade and I do have a folder containing a backup of the original files, although I cannot say for certain if I downloaded it before or after attempting the upgrade..?
Posts: 16503
Man, I feel your pain.
But what you should be doing, on any system you ever admin over. Never rely on the hosts backups or their backup service alone.
That aside, if your versions.dat file is blank. We might be able to dig into the database to get this information. suprsidr or Dayo might get the info needed to look that up before I do, but you can try digging around in the DB somewhere in plugins for the core module, should be that info. I always have to pull up phpMyAdmin and browse the DB for that....
____________________________________________
Like Gallery? Like the support? Donate now!
Posts: 16
Thanks nivekiam, I'll see if I can find that in phpMyAdmin..
Posts: 16
in g2_PluginParameterMap I have :
module | core | 0 | _version | 1.3.0
is this what you needed?
Posts: 7892
look to table g2_PluginPackageMap
pluginId: core
packageName: base
packageVersion: x.x.x.x
packageBuild: xxxxx
if you have that table.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 16
yes I have it :
module core base 1.3.0 18183 0
Posts: 7892
looks like you are at version 2.3
change your versions.dat to read
and retry your upgrade to 2.3.1
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 16
oh cool, thanks suprsidr - I'll give it a whirl..!
Posts: 16
nice one - it worked!
thanks again for all your help guys!
Posts: 16503
Now to get that backup strategy in place
____________________________________________
Like Gallery? Like the support? Donate now!
Posts: 25961
Great support guys!
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team