[SOLVED] Upgrading 2.1.2 to 2.3.2 without original installation

boscopup

Joined: 2006-09-05
Posts: 7
Posted: Mon, 2013-03-04 03:54

I know that sounds weird, but...

Long story short: Bad host, lost files, I had a backup of the database (old, but usable). So I have a 2.1.2 database and all the images to go with it in their original album file structure. What I don't have is the original Gallery2 2.1.2 files themselves. That version appears to no longer be accessible from sourceforge.

Things I've tried so far, causing me to bang my head against a brick wall:

1) Gallery 3... installation went fine, imported albums, all is good... until I try to integrate with Wordpress 3. I tried the heiv plugin, but had no clue how to use it, and it appears to not do what I want (though it may - I can't tell without any basic documentation). I tried suprsidr's plugin, and I at least had hopes that it would do what I wanted, since his demo does it... it displayed all of the albums, but when I clicked on an album, the breadcrumbs changed appropriately and the images did not change - still saw the top level albums. Again, without any documentation, hard to troubleshoot. So I gave up and decided to go back to Gallery 2 with WPG2 which I knew used to work (I initially had abandoned it when upgrading Wordpress because WPG2 hadn't been updated at that point... now I realize it has).

2) Gallery 2 from old database. I first installed the latest version of Gallery 2, then replaced the database with my backup, thinking I could just upgrade. But I guess you have to go major release by major release. Makes sense. No big deal. My database is 2.1.2. I try putting 2.2.6 in there and upgrading that. It first complains about PHP errors. I download an older version of PHP to get rid of that (I'm trying to get all this integrated on a WAMP server before I upload to my Linux host). So I get rid of the PHP errors, but now it's just taking me to a regular installation, NOT an upgrade. It gives me the option to wipe the database. I don't want that! So then I figure maybe I need to go back to my original 2.1.2 installation and get that working, THEN upgrade. But those files aren't available, and I haven't yet found an old copy on my hard drive. So now I'm stuck...

How do I get this thing updated without the original installation? Or if I can get that Gallery 3 plugin to work right, that would be cool too. I really don't care which Gallery I use. It's just a family blog with a photo album. How hard does this need to be? I even tried using another photo album (after being with Gallery for 9 years now), and it had no way to import a file structure. I'm not importing over 1000 pictures by hand. No way no how. So back to Gallery it is. I'll use whichever version I can get to work inside Wordpress. I just want to display the albums in a Wordpress page.

I would appreciate any help I could get. I'm at the point of maniacal laughter at the continuous roadblocks. Thank you in advance. :)

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2013-03-04 13:30

here is 2.1.2

Gallery will assume install over upgrade if it does not find or cannot read g2data/versions.dat

best bet is to perform fresh install and then swap g2data w/ old g2data and import old DB

Then upgrade to 2.2.6 then finally to 2.3.2

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
boscopup

Joined: 2006-09-05
Posts: 7
Posted: Mon, 2013-03-04 15:18

Thank you!

Ok, I'm trying to install 2.1.2, and I'm getting a MySQL error:

Quote:
(mysqlt): SHOW TABLES (mysqlt): CREATE TABLE gtst0Schema( g_name varchar(128) NOT NULL, g_major int(11) NOT NULL, g_minor int(11) NOT NULL, PRIMARY KEY(g_name) ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */ 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */' at line 6

ADOConnection._Execute(CREATE TABLE gtst0Schema(
g_name varchar(128) NOT NULL,
g_major int(11) NOT NULL,
g_minor int(11) NOT NULL,
PRIMARY KEY(g_na..., false) % line 855, file: adodb.inc.php
ADOConnection.Execute(CREATE TABLE gtst0Schema(
g_name varchar(128) NOT NULL,
g_major int(11) NOT NULL,
g_minor int(11) NOT NULL,
PRIMARY KEY(g_na...) % line 446, file: DatabaseSetupStep.class
DatabaseSetupStep._executeSql(CREATE TABLE DB_TABLE_PREFIXSchema(
DB_COLUMN_PREFIXname varchar(128) NOT NULL,
DB_COLUMN_PREFIXmajor int(11) NOT NULL,
DB_CO..., gtst0) % line 393, file: DatabaseSetupStep.class
DatabaseSetupStep._testPrivileges(mysql, Array[48]) % line 151, file: DatabaseSetupStep.class
DatabaseSetupStep.loadTemplateData(Array[2]) % line 207, file: index.php

I am guessing this is because I am running MySQL 5.5.8? I really can't win here. LOL. Not Gallery's fault, of course. :)

I tried putting 2.2.6 files in there, editing versions.dat to match what is in the database (core 1.1.0.2, gallery 2.1.2), but it says they don't match, so once again it only gives me the option of wiping the database. Shouldn't my fake-out have worked? The contents of versions.dat:

Quote:
1.1.0.2
2.1.2

And from the database g2_maintenancemap g_details:

Quote:
"Gallery version = 2.1.2 core 1.1.0.2"

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2013-03-04 15:43

if your DB is already 2.1.2, upgrading to 2.2.6 should be no problem.
As I stated above gallery was likely having an issue reading versions.dat
Make sure your entire g2data is readable/writable to the webserver user
chmod -R 0777 /path/to/g2data

Gallery2 is compatible w/ mysql 5.x

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2013-03-04 15:48

try this:

  • Install a fresh 2.2.6 to get a proper config.php
  • Replace g2data w/ old g2data - making sure all is readable
  • Replace DB
  • This should prompt the upgrader

It will also be important to have all of you old modules present in their new versions

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
boscopup

Joined: 2006-09-05
Posts: 7
Posted: Mon, 2013-03-04 19:58

Thanks so much! With your recommendations, I got it working! Hooray!

Well, I have no thumbnails, but that's ImageMagick, and this is only my home test server on Windows 7. The real thing will be on Linux, so I'm not worried about the thumbnails at this point in time. I think they'll be easy to get working on the real server.

I really appreciate your help!