Problem with Upper/Lowercase filename in G1 prior to G2 migration

2035

Joined: 2008-12-24
Posts: 3
Posted: Sun, 2009-01-18 16:35

G1 version:1.5.10
G1 character set:?English
PHP memory limit:128M
--
PHP version :PHP v5.2.6
Webserver (e.g. Apache 1.3.33): Apache/2.2.9 (Mandriva Linux/PREFORK-12mdv2009.0
Database (e.g. MySql 5.0.32): N/A
Activated toolkits (e.g. NetPbm, GD):ImageMagick
Operating system (e.g. Linux):Mandriva 2009
Browser (e.g. Firefox 2.0):Any

I am trying to migrate to G2. I had a hard disk failure, and I had to recreate the gallery install (1.5.10) and everything seemed fine, except when I try to view the original image - it is not found. Part of the filenames of the thumbails and intermediate images have a different case than the original image. In Linux, the case is important (filename.txt is not equal to FILENAME.txt). For instance, an original image named img_1000.jpg has IMG_1000.thumb.jpg and IMG_9736.size.jpg. When I try to do a validate, it says there are 11,000 images/files missing. It would be very painful to reload all of them as suggested by the validation tool.

I have thought about just changing the case of all the letters in the filenames, but some of them have people and place names that I would like to keep intact.

Any help would be appreciated.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2009-01-18 19:48

Just to clarify:
your G1 is working but you can't see the original full sized image? is the file in the albums directory? What is the error; "file not found"?
how did the file names change, during the recreation after disk failure?

What if you rename them on the file system, can you get the full seized image? Does the validation count go down by one?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
2035

Joined: 2008-12-24
Posts: 3
Posted: Sun, 2009-01-18 21:44

G1 is working, EXCEPT the full size original images are not visible when they should be. Since I posted, I made the Apache server insensitive to case by uncommenting in the httpd file:

LoadModule speling_module /usr/lib/apache/modules/mod_speling.so

CheckSpelling On

also is needed, but was on by default. After this Apache tweak, the full images are displaying but when I go into Validate images, it still says all of the images (originals) are missing - 12,0000 of them, and it says:

The following files are missing from the albums directory. Information is still stored about the photo in the album data, but the file itself is no longer present for some reason. These files will cause failures when attempting to migrate to Gallery 2.x.
This can be fixed in one of two ways:
* The first is to simply delete the photo entry from the album.
* The second is to manually re-add the file to the albums directory using the filename you see in the left side of the table.

To answer your questions, the files are all in there, but like I said initially, they have a different case than the original files, i.e. original img_1000.jpg and the generated ones are IMG_1000.thumbs.jpg and IMG_1000.sized.jpg. Notice the case of "img" between the files.

Looking back at the original data files, this change in case seems to have been the case all alon - I have been running gallery for 5+ years. The disk failure didn't affect the image data, I had a good copy.

I upgraded to Mandriva 10, and the current Gallery - I think I may have been running Gallery 1.4(?) previously. Maybe I need to install an older (1.4) version of the Gallery, or maybe regenerate all the thumbs...?

When I renamed a file, for instance, (in the same directory), dscn1205.jpg to DSCN1205.jpg, it does go down 1 one. To 12,765.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2009-01-18 22:05
Quote:
When I renamed a file, for instance, (in the same directory), dscn1205.jpg to DSCN1205.jpg, it does go down 1 one. To 12,765.

Then I guess you have your answer.
- You have to rename the files manually
- or with a script you write.
- Edit the migration module to not check the file case.

Quote:
I think I may have been running Gallery 1.4(?) previously. Maybe I need to install an older (1.4) version of the Gallery, or maybe regenerate all the thumbs...?

Give it a whirl see if it works.

Do you have descriptions, comments, summaries for the items in G1? If not then just import them into G2.

I don't know what/why changed, so can only offer ideas on what to do, not what has been done.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
2035

Joined: 2008-12-24
Posts: 3
Posted: Sun, 2009-01-18 22:40

I have a couple of questions -

Has anyone seen this problem before?
Any hint on how to write such a script?
Is there somewhere to download old versions of gallery?
What did you mean by this?

Quote:
Do you have descriptions, comments, summaries for the items in G1? If not then just import them into G2.

I only have the images, nothing else, but there is a heirarchy by year.
Any way to regenerate all the thumbs? Delete them all then.....?

Thanks

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2009-01-19 02:14
Quote:
Is there somewhere to download old versions of gallery?

yes: http://downloads.sourceforge.net/gallery/gallery-1.4.4.zip will give you version 1.4.4
http://downloads.sourceforge.net/gallery/gallery-1.5.10.zip will give you version 1.5.10

Quote:
I only have the images, nothing else, but there is a heirarchy by year.

then just import those items via the from local server method in G2:
http://codex.gallery2.org/Gallery2:How_to_Add_Items#How_to_Add_Items_from_the_Local_Server_.28or_with_FTP.29

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team