PHP gallery

[prev] [thread] [next] [lurker] [Date index for 2005/07/05]

From: Simon Wistow
Subject: PHP gallery
Date: 12:20 on 05 Jul 2005
Apart from having a stupid name (almost as brain dead as calling 
something .NET or COM) I actually really liked PHP Gallery. It was easy 
to set up and it did everything I wanted.

Then one of my users created a sub album. Two actually.

And I couldn't work out how to delete it. Unlike the main album there 
didn't seem to be a handy dandy button to say delete.

Since it seemed to be directory based rather than DB base I did 
something slightly stupid. I just deleted the directory of the second 
album. (Which was in the root albums diretcory, not a subdirectory of 
the directory of its parent album).

Without making a backup first.

DOH!

This actually appeared to do nothing.

Apparently, I found out after trawling through the various web sites out
there, what I should have done is scrolled through all 400 photos
looking for the virtual photo representing the sub album. Anfd then hit
'album actions -> delete'. This worked fine for the first album but
threw an error syaing that the second album didn't exist.

So I grep for the name (album02) and find it in photos.dat of the parent 
album (still with me) which appears to be a serialised data structure. I 
make a backup and edit photos.dat by hand. Which causes all the photos 
in the parent album to disapear.

DOH!

Restore. 

Chew finger nails.

Create two new sub albums. Sure enough these are given the name album01 
and album02.

Delete the orphan album02. It works! Huzzah! Delete the new album01. It 
works! Delete the new album02. Failure!

Chew finger nails again.

Repeat steps again but this time back up new album02 dir, delete orphan 
album02, delete new album01, restore album02 dir, delete orphan album02. 

SUCCESS! PIMMS ALL ROUND!

Of course now I'm worried that other data is in an inconsistent state 
but it *looks* ok. What a fucking palaver.








Generated at 16:00 on 12 Jul 2005 by mariachi 0.52