Errors while rebuilding attachment thumbnails

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mobosix
    Senior Member
    • Oct 2003
    • 299
    • 4.2.X

    [Forum] Errors while rebuilding attachment thumbnails

    The /images folder was lost on my server and I'm trying to restore all of the images (user albums and post attachments). I've had that folder restored from a back up and some of the images and thumbnails are showing correctly now. However, I am getting a lot of the below errors...

    Processing: Attachment : 1440 (jpg) Error: Invalid image file or GD version is set wrong

    I'm also getting a lot off just plain 'Error' messages on .jpg files.

    Searching the forums here I found this thread, and have turned on the PHPinfo. The URL is www.sailsofglory.org

    Any help would be much appreciated,

    Keith
  • BirdOPrey5
    Senior Member
    • Jul 2008
    • 9613
    • 5.6.3

    #2
    If files were lost then I would expect you would see such errors. Have you checked to see if the files corresponding to those attachments exist and aren't corrupted?

    Comment

    • mobosix
      Senior Member
      • Oct 2003
      • 299
      • 4.2.X

      #3
      Hi Joe,

      I'm trying to verify that those files are there, but the vB way of naming and storing images is kind of hard to decipher. My understanding is that images uploaded by user ID 1234 would be stored in the images/attachments/1/2/3/4 folder on the server (I've opted to store images in the file system instead of the database). Is that correct? If so, what about for user ID 1 or 4?

      If I concentrate on the images people have uploaded to their Albums, how can I use the URL info displayed in the album to help track down where the actual image is stored on the sever.

      Thanks for the time and help,

      Keith

      Comment

      • BirdOPrey5
        Senior Member
        • Jul 2008
        • 9613
        • 5.6.3

        #4
        Yes it is true about where they are stored but go to the database, look at the attachment table...

        Find the attachmentid of the attachment you want to check in the attachment table

        The userid of the user who uploaded it will be listed there

        So go to the proper directory based on how each digit of the userid is a subfolder.

        In the final folder you end up in there should be a file with the attachmentid number and the extension .attach

        Copy this file and rename it to whateer.jpg or whatever the correct file extension is supposed to be, and see if you can view it in your browser or if it is corrupted. The file might even be missing and you don't find it in the folder at all.

        Comment

        • mobosix
          Senior Member
          • Oct 2003
          • 299
          • 4.2.X

          #5
          Thanks Joe, Since it will be much easier to find and fix images starting with the ones I personally uploaded, would I find my images in /images/attachments/1 (my userid is 1).

          Comment

          • mobosix
            Senior Member
            • Oct 2003
            • 299
            • 4.2.X

            #6
            Alright, a little more info/questions.

            Looking at the image http://sailsofglory.org/attachment.php?attachmentid=1938&d=1360895434 that was uploaded by userid 154. The image is showing in his album, but it is corrupt. When I go look in /images/attachments/1/5/4/, and try and open 1938.attach or 1938.jpg, nothing shows. When I try an open 1938.thumb, it opens, but is for a different picture entirely. Now I'm even more confused. lol

            Comment

            • mobosix
              Senior Member
              • Oct 2003
              • 299
              • 4.2.X

              #7
              Okay, here is what vB is showing is the image for attachmentid 1938:



              And this is what image the actually file 1938.attach is:

              Comment

              • BirdOPrey5
                Senior Member
                • Jul 2008
                • 9613
                • 5.6.3

                #8
                What does the .thumb look like, the top or bottom picture?

                Comment

                • mobosix
                  Senior Member
                  • Oct 2003
                  • 299
                  • 4.2.X

                  #9
                  It's a corrupted version of the bottom one (on the server, Not at home so I can't check the file on my main computer).

                  What folder would attachments be in for userid 1?

                  Comment

                  • mobosix
                    Senior Member
                    • Oct 2003
                    • 299
                    • 4.2.X

                    #10
                    Nothing more to add?

                    Comment

                    • Wayne Luke
                      vBulletin Technical Support Lead
                      • Aug 2000
                      • 74152

                      #11
                      Userid 1 would have their attachments stored in the folder /1/ within your attachment directory.
                      Translations provided by Google.

                      Wayne Luke
                      The Rabid Badger - a vBulletin Cloud demonstration site.
                      vBulletin 5 API

                      Comment

                      • mobosix
                        Senior Member
                        • Oct 2003
                        • 299
                        • 4.2.X

                        #12
                        Thanks Wayne, but something is not right here. Please open this image from my site:



                        As you can see, the image loads just fine and has an attachmentid of 3200. When I go on my sever and look at the folder /images/attachments/1 there is no 3200.thumb or 3200.attach files in there!

                        Comment

                        Related Topics

                        Collapse

                        Working...