“Fun” with Gallery 1.5.3, 1.5.10, 2, 3RC1; Leahpeah photos

I mentioned moving Leah over to WordPress a few days ago, and that went well. I’ve been migrating over her prior content and deleting unused content a bit since then.

In rooting through the site, I came across this:

… which we put in place when there were folks deeplinking some larger images on her site. It was kind of fun, though she never got the kind of traffic or server impact that imagine Jason Scott got during his MySpace/Goatse adventures.

Anyway, I upgraded her photos area, no, not her flickr account, this predated that. It’s got photos from about 2002. It was run with Gallery, which for its time was pretty good. It had theming, could import photos from the filesystem, and automatically did thumbnailing, and could import videos, pngs, gifs, jpgs, bmps. It worked well.

But it was a pain to maintain and theme. I avoided doing anything with it, and as time passed small changes would cause problems. I had done some includes across the rest of Leah’s site, and these caused problems because I made other changes later. It was running version 1.5.3. I neglected it, and it gathered spam comments and had a big memory allocation error at the top of the page and UGH! The frustration.

Well, with the release of the new version of Leah‘s site on a new server, nice and clean, I had the opportunity to work on a staging server to see if I could upgrade the site and make it work. And so I started. I downloaded the latest version: Gallery 3 RC1. That went well, a nice process altogether, but rather detailed. Image apps have to point at a lot of local resources – ImageMagick or NetPBM, folder paths need to be set — it takes some attention to get it right. It uses MySQL on the backend and Kohana as the underlying application framework. It looked like a go, and loading new photos and making new albums worked fine, but there was no option to import from Gallery 1, only Gallery 2.

Okay, fine, I thought. I’ll just upgrade to version 2. No problem, version 3 is only a Release Candidate anyway. So I did the same process again, though different. It’s a clunkier process, but I got it working pretty fast. Then I went to import my Version 1 Gallery with the import docs, and it didn’t work.

Uh, what? I’m on 1. Gallery 2 can import 1. Only, no, it can’t import my specific version of Gallery. It needed to be running version 1.5.10 to be importable.

So I installed version 1.5.10, clunkier still, but familiar to me. Though I had a heck of a time finding where to fix the install errors, mostly the locations of binaries. The interface is maybe a dozen different tabs with lots of options. And voila, I got it working, rebuilt the thumbnails and things seemed to work okay.

Once I was there, I ran the import from Gallery 1 into Gallery 2. That required lots of rather long processes to determine if my .data files had enough integrity and whether there were any photos that were leftovers from the prior version. Several were, and Gallery 2 fixed that.

Luckily, the instructions on The Gallery Codex are very, very thorough. If you have upgrades like this to do, this is your bible. Follow those instructions very carefully.

So I got Gallery 2 running great, and looking great, and all the photos were imported properly. It did take about an hour and a half to process all the photos into the new format, but working = good. Once that was done, I thought, “well heck, might as well push forward to Gallery 3” — which worked pretty well, until I came to the process where it was going to import comments.

That process indicated that I had about 12 hours to wait until all the comments would import. I thought, “that can’t be right.” I let it run.

And run.

And run.

After about 45 minutes I thought to myself. How many comments could these photos have? Turned out that number was about 135,000. Which, uh, was ridiculous.

So I went looking for a way to run Akismet against the comment database in Gallery 2. That sort of worked. So I thought, I’ll try the same thing against the comments that had already imported into Gallery 3 (if I remember right, about 4000). There was no easy way to do either.

So then I was rooting around in the MySQL database for my Gallery 2 install. Running queries, killing off spam comments. I knew I had some comments I wanted to keep, and the thought of deleting them all just because the damn spambots had hit this ancient Gallery so hard irritated me. So, based on my hatred of spammers, I pressed on and worked till I found some patterns I could use to bulk delete. I was pretty tired by that point. In retrospect, I could have gotten much further along had I started ordering the comments by date from the start. Instead I was using the keys in the database, thinking lower meant earlier, but the import from G1 to G2 was not in chronological, so my PK’s were a mess.

So I finally got through that in Gallery 2. And I reimported G2 to G3. It recognized the photos already imported, brought in the comments, and voila! I had a working gallery with all my photos.

G3 has much better organization. It’s definitely cleaner to look at on the filesystem, which is nice. G1 had a separate folder for source files (albums) than the gallery, which was a pain in the neck. Being able to simply rename the folder, and change a few configuration settings made it worth it.

Of course, then I wanted a slightly prettier theme. Well, G3 themes are really not fully baked yet. Some had simple .zip file downloads, some of which point to a github account. They’ve done some great work, but they’re really not ready for the masses to use this in the same way, say, WordPress has been forced to be.

I found a nice theme by Stopdesign and that’s how it looks now. It’s not perfect, but it’s plain.

I was going to build a theme from scratch in the same way I’ve been building WordPress themes lately, but I’m holding off for a while.

This was a lot of work, but it was all worthwhile when I came across this photo from 2003, of my wife and stepkids, from 2003:

Seeing this photo made my heart dance. It made all the pain of upgrading worthwhile.

Oh, and for comparison, 7 years later, the kids look like this:

six comments so far...

Good post that I’m sure will be helpful to some, but in the end it just reminded me of why I switched away from Gallery last year. Glad you got it to work for Leah.

Haha Chuck. I actually think that the reason this post might be helpful is that it shows the pain of upgrading. What version were you using of Gallery?

I will say though, given the new layout of the folders in Gallery 3, I think they’ve figured out how to do theming and upgrades right.

You use ZenPhoto for Vista right? How are you liking it?

Looks like the last was 2.3, but I’d been using it for a while and had gone through several upgrades. It was always a bit tempermental.

Loving Zenphoto. It doesn’t have all the features (some might say bloat) of Gallery, but it does everything I need and the editing of the templates (and accessing the mySql directly for use in the other sites) is very straightforward.

Temperamental for sure.

I actually hacked on my instance of Gallery quite a bit, and about a year ago I tore out most of it. I don’t think I can upgrade that Gallery even if I want to. I’ll be looking at Zenphoto close. Thanks!

Gotta love that open source ease-of-use! You tenacity is to be applauded, I would have just extracted out the photos and dumped them on Flickr.

Yeah I almost went that way Sassy, but I was determined not to let the damn software win. And G3 looked promising enough to stick with.

As for OS ease of use, WordPress still kicks everything else’s ass in terms of making upgrades easy.

I’ll be checking out what Chuck uses, Zenphoto, when I find some time to look at my own site for upgrades.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.