Announcement

Collapse
No announcement yet.

Retrieve remote file and reference locally - error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Retrieve remote file and reference locally - error

    If I URL link an image (Image Properties / Image info / URL) and select "Retrieve remote file and reference locally" I get an error:
    This is not a valid image file.

    It is a valid file and it displays correctly as a URL so I think the error is actually complaining about upload permissions or configuration.

    What should I check?

    The upload tab works fine and the same images can be uploaded there, it only the "Retrieve remote file and reference locally" option not working.

  • #2
    "This is not a valid image file" means it fails the security checks in vBulletin. The file could have non-image code within its metadata. It could be stored with an improper extension. It could be an image format not supported by vBulletin.

    What is the URL to the file that is causing problems?

    What happens when you upload the file to the server on the Upload Tab. This is really all that checkbox is doing, it goes to the URL and copies the file to your server as an attachment.
    Translations provided by Google.

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

    Comment


    • #3
      Thanks for the reply Wayne.

      Interesting, it seems all the images I tried previously gave the error.

      Your avatar works fine:
      https://forum.vbulletin.com/core/cus...atar868_15.png

      This image doesn't:
      https://beanbay.coffeesnobs.com.au/U...120_120_59.jpg
      (created with a "save for web" JPG export from an old version of Photoshop)

      Linking to something like:
      https://forum.vbulletin.com/filedata...032&type=thumb
      doesn't work either.

      Comment


      • #4
        What Image Processing Library are you using? Settings -> Options -> Image Settings. If you are trying to use IMAGICK, make sure it is properly installed in PHP.
        Translations provided by Google.

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

        Comment


        • #5
          Both of the problematic images work on my test installation.

          Click image for larger version

Name:	CAT120_120_59.jpg
Views:	60
Size:	6.2 KB
ID:	4440850Click image for larger version

Name:	fetch?id=4440421&d=1589303032&type=thumb.png
Views:	57
Size:	9.8 KB
ID:	4440851

          They seem to work here.

          Translations provided by Google.

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

          Comment


          • #6
            Originally posted by Wayne Luke View Post
            What Image Processing Library are you using? Settings -> Options -> Image Settings. If you are trying to use IMAGICK, make sure it is properly installed in PHP.
            Was using GD when I reported the problem on the weekend.
            Then installed ImageMagic6 and got the same error
            Then installed IMAGICK and still get the problem.

            Interestingly, of the 3 links in post #3, it's only the second one that now has a problem on my site


            Click image for larger version

Name:	CAT120_120_59.jpg
Views:	84
Size:	6.2 KB
ID:	4440893
            (and yes, works fine here)

            What am I missing?

            Comment


            • #7
              Any clues where to start looking?

              Comment


              • #8
                https://forum.vbulletin.com/forum/vb...esting-support

                In addition to the information requested there, what version if ImageMagick is installed on the command line? It should be at least version 6.

                What are the settings for IMAGICK in the PHP Info screen?
                Translations provided by Google.

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

                Comment


                • #9
                  (ouch - I'll wear that).

                  vB - 5.6.1p1
                  PHP - 7.4.1
                  MySQL - 8.0.19
                  Windows Server 2019 / IIS

                  Like I said, this problem happens using GD and default settings. I only installed imageMagick and imagick for troubleshooting it.

                  Steps were:
                  GD - upload failed.
                  imagemagick 6 - installed, tested at command line, upload failed.
                  imagemagic 7 - installed, imagick installed, upload failed.

                  current php info:

                  .imagick
                  imagick module enabled
                  imagick module version 3.4.4
                  imagick classes Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator, ImagickKernel
                  Imagick compiled with ImageMagick version ImageMagick 7.0.7-11 Q16 x64 2017-11-23 http://www.imagemagick.org
                  Imagick using ImageMagick library version ImageMagick 7.0.7-11 Q16 x64 2017-11-23 http://www.imagemagick.org
                  ImageMagick copyright Copyright (C) 1999-2015 ImageMagick Studio LLC
                  ImageMagick release date 2017-11-23
                  ImageMagick number of supported formats: 238

                  I can turn GD back-on as the vB image processor and get the same error.

                  Comment


                  • #10
                    Starting to suspect it is a Windows issue. PHP works just a bit differently on Windows. Are you storing attachments in the database or file system? What are the results of the file upload diagnostic under Maintenance -> Diagnostics.
                    Translations provided by Google.

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

                    Comment


                    • #11
                      Stored in the file system.

                      -- file upload diagnostic under Maintenance -> Diagnostics.
                      No errors occurred while opening the uploaded file for reading.

                      but, I also found something else in the diagnostics that I didn't know about.
                      Test Imagick Extension
                      Imagick API returned an error when processing a PDF: PDFDelegateFailed `The system cannot find the file specified. ' @ error/pdf.c/ReadPDFImage/794

                      which I'll troubleshoot but as mentioned, I get the "This is not a valid image file" error under GD too.

                      Comment


                      • #12
                        The PDF issue means that GhostScript isn't installed on the server. It is required to create JPEG thumbnails of PDF files. This can be turned off in the AdminCP.

                        What version of ImageMagick do you have installed on the server?
                        Translations provided by Google.

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

                        Comment


                        • #13
                          Versions installed are:
                          ImageMagick-6.9.11-12-Q16-x64-dll
                          ImageMagick-7.0.10-13-Q16-x64-dll

                          ...but I've gone back to GD (to take imagemagick, imagic, ghostscript out of the variables)

                          GD still gives the error: "This is not a valid image file"

                          Comment


                          • #14
                            What are the results of the upload file diagnostic under Maintenance -> Diagnostics?

                            Translations provided by Google.

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

                            Comment


                            • #15
                              (same image, saved locally, uploaded via Maintenance -> Diagnostics)

                              Pertinent PHP Settings

                              file_uploads: On
                              open_basedir: None
                              upload_tmp_dir: C:\temp
                              upload_max_filesize: 20.00 MB

                              Results
                              No errors occurred while opening the uploaded file for reading.

                              Comment

                              Related Topics

                              Collapse

                              Working...
                              X