Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: pic.JPG vs. pic.jpg > how to re-attach originals to missing item on gallery???  (Read 3592 times)

0 Members and 1 Guest are viewing this topic.

stoeby

  • Coppermine newbie
  • Offline Offline
  • Posts: 8

Hello, I couldn't find a case like this in the forum. (Only how to delete missing items on Server after deleted files.)
I need a solution in other way. How to re-attach original files from a backup to the missing items on Server?
at the moment the gallery's site is: http://www.turnabteilung-medienarchiv.de/cpg148

Where should I start... I have had a problem which was solved here http://forum.coppermine-gallery.net/index.php/topic,70170.msg343566.html#msg343566, but created a new one. A short outline: Server cpg148 hacked, made backup of Serverfiles with FileZilla, sanatized files locally, deleted all files on Server (which was slightly wrong), Uploaded sanatized Files, Upgrade to cpg15x! As my wish, Structure of Albums and Pictures available. MANY THX TO THIS FORUM & ITS POSTERS!!!

!!!!BUT now a few Pictures are missing and only shown with a Dustbin-Thumbnail. (see Foto14~0-gallery-Thumbnails.JPG)!!!!!
These are Pictures which have the same name as other files on the Server because it can handle e.g. Picture.jpg and Picture.JPG (see Attachment FileZilla-Foto14JPGvsFoto14jpg.JPG). While doing the mentioned backup with over 2000 files, filezilla was asking to overwrite existing files. I did not know why there are morethan one of the same file, so I chose to Overwrite, if the file is a newer one and checked the Botton to repeat it for the whole batch (see FileZilla-OverwriteExistingFile.JPG).
Finaly I lost about 70 picture in the backup. This would not be so bad if I wouldn't have deletet all the existing files from Server, as mentioned above.
Now I got from the previous "Admin" a Photo-CD with the original Photos, unfortunately with original filenames.
As you can see, the file 14.JPG on the CD is the same as 14~0.JPG on Server(compare Foto14-CD.JPG and Foto14~0-gallery-EditPic.JPG).
  • I uploaded this file 14.JPG from CD to \userpics\10001 on the server and changed the missing item's filename with edit_one_pic.php from 14~0.JPG to 14.JPG. >> No Success ("ERROR, File 14.JPG already exists")
  • Just to rename the file on the Serverdirectory \10001\ into 14~0.JPG, was unsuccessful too.
  • Next try, was equal: delete the file 14~0.JPG from Server. Change with edit_one_pic.php the missing item's filename from 14~0.JPG to 14.JPG and uploaded file 14.JPG from CD to Server. >>> "ERROR, File 14~0.JPG is missing."
  • Anyway, edit_one_pic.php couldn't change the name of the missing item.
    • And uploading a file with the same name was not working, too.
    How will I get the pictures back to their place, where they are missing. I will do it for every single of the 70 missing pictures, but it must be possible. Again, I am very sorry for "overreading a single line" in the very good cpg documentations, what has brought me into this situation.

    Any idea is welcome.
    Thx in advance.
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4826
    • Windsurf.me

Please start by opening up your gallery, it is hard to check things when we can only view the thumbs.

Are the fullsize images still in tact and where they were? If they are then you can simply run admin tools to re-generate the thumbs and intermediate pics (As you can appreciate, I could have found this out if your gallery was open).

As the database is in tact then even if the images are missing then it might still be possible with a bit of effort to recover even if th fullsize images are not still there.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15760

I did not know why there are morethan one of the same file
I'm currently not sure if it's OS depended or file system depended, but on Linux with one of the recommended file systems file names are case sensitive. That means that 'File1' and 'file1' are different files!


To recover the overwritten/missing pictures I'd do the following (regardless of your description). Just have a look which files are missing. Then upload that files with the same file names (including the same case). Now you should be able to see the full-sized version of that pictures. If that works, run the admin tools to create the intermediate-sized pictures (if needed) and the thumbnails. Don't try to rename that files with edit_one_pic.php.
Logged

stoeby

  • Coppermine newbie
  • Offline Offline
  • Posts: 8

I'm currently not sure if it's OS depended or file system depended, but on Linux with one of the recommended file systems file names are case sensitive. That means that 'File1' and 'file1' are different files!
I am with you: the overwrite problem seems to be from WinXP. It can not differ between .jpg and .JPG. Users of FileZilla should be warned for this problem, when creating backups. Maybe it exists, but I did't read it  ::)

To recover the overwritten/missing pictures I'd do the following (regardless of your description). Just have a look which files are missing. Then upload that files with the same file names (including the same case). Now you should be able to see the full-sized version of that pictures. If that works, run the admin tools to create the intermediate-sized pictures (if needed) and the thumbnails. Don't try to rename that files with edit_one_pic.php.
Yes, it works: renamed original file 14.JPG from CD to 14~0.JPG and uploaded it beside 14~0.jpg. Now the Fullsizepicture of 14~0.JPG was visible, but not the thumb. Therefore I ran the Admintool "Update thumbs" of that Album > Thumb available.  :) Thx, André
I have to do this for the around 70pics. The Admintool "update thumbs" gave me an errorreport like this.
Extract of run1: "...
ERROR creating: albums/userpics/10001/thumb_16~0.JPG
albums/userpics/10001/thumb_15~0.jpg updated successfully
albums/userpics/10001/thumb_14~0.JPG updated successfully
ERROR creating: albums/userpics/10001/thumb_13~0.JPG
..."
Extract of run 2: "...ERROR creating: albums/userpics/10001/thumb_16~0.JPG
albums/userpics/10001/thumb_15~0.jpg updated successfully
albums/userpics/10001/thumb_14~0.JPG updated successfully
albums/userpics/10001/thumb_13~0.JPG updated successfully
ERROR creating: albums/userpics/10001/thumb_12~0.JPG
..."
As you can see the update was good for 14~0.JPG and 13~0.JPG, which I uploaded step by step for testing your suggestions.
If I ran the tool for all Albums, would it show me a list of all missing pictures??? It would be easier for me to identify those, than seeking for them through every album. Or do you see another way to repair quicker all missing pictures? I am afraid of destruction in anyway.

Thanks in advance
Logged

stoeby

  • Coppermine newbie
  • Offline Offline
  • Posts: 8

Please start by opening up your gallery, it is hard to check things when we can only view the thumbs.
Thx Phill, I opended the gallery for guests to view thumbs AND medium AND fullsize.

As the database is in tact then even if the images are missing then it might still be possible with a bit of effort to recover even if th fullsize images are not still there.

What other kind of effort is possible, than "renaming and uploading every single picture and the running Admintool update thumbs"??? I am not lazy, but everytime interested in efficient way to solve pfoblems.

Thanks
Logged

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1510
  • aka 'i-imagine'
    • Home Page

Look for the button "Toggle Directory Comparison" in Filezilla - try that first.
70 missing files should not take too long to find.

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15760

Users of FileZilla should be warned for this problem, when creating backups. Maybe it exists, but I did't read it  ::)
filezilla was asking to overwrite existing files.
;)


If I ran the tool for all Albums, would it show me a list of all missing pictures??? It would be easier for me to identify those, than seeking for them through every album. Or do you see another way to repair quicker all missing pictures?
I don't know if it will create such a list for you. But I've created a plugin which checks for missing files in your gallery (actually it's a quite big plugin which adds various functionality and optical modifications to my gallery). If you're interested I'll try to extract the corresponding code part and create a standalone plugin.
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4826
    • Windsurf.me

My top tip here is to get yourself a copy of Ubuntu or similar installed on your windows box. You can run Ubuntu as a Windows application, uninstall it etc from the control panel.

Using a Linux install is by far the best way to do all your web administration even if it is just for the simple fact that is respects the upper/lower case file system. Your webhost is almost certainly Linux based so going this way makes so much sense. It would have saved you all the hassle you are having now.
Logged
It is a mistake to think you can solve any major problems just with potatoes.
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 22 queries.