Uploaded images are broken

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Reestv
    New Member
    • Apr 2011
    • 21
    • 5.0.X

    Uploaded images are broken

    Hi.

    We have just installed vBulletin 5 Connect to our server, but none of the images seem to be working when we attempt to upload them through the forum system. For an example, image attachments will show as broken images if you try to upload them, as well as uploading a logo via the vBulletin interface. We've installed GD to the server and set up the url path correctly, but still we are seeing broken images when we attempt to upload.
    Our server is Ubuntu Server 12.04 "Precise Pangolin" LTS (32bits).

    If you have any ideas, it would greatly help.

    Best Regards.
  • Mark.B
    vBulletin Support
    • Feb 2004
    • 24288
    • 6.0.X

    #2
    Are you storing images in the database, or the file system?
    MARK.B
    vBulletin Support
    ------------
    My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
    My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

    Comment

    • Reestv
      New Member
      • Apr 2011
      • 21
      • 5.0.X

      #3
      We're storing images in the database.
      We tried the file system also, but it didn't work.

      Comment

      • Reestv
        New Member
        • Apr 2011
        • 21
        • 5.0.X

        #4
        Sorry to bump, but I was just wondering if anyone had any solutions?

        Best Regards.

        Comment

        • BirdOPrey5
          Senior Member
          • Jul 2008
          • 9613
          • 5.6.3

          #5
          If you go to the Admin CP -> Maintenance -> Diagnostics and run the upload diagnostic, what result do you get?

          Comment

          • Reestv
            New Member
            • Apr 2011
            • 21
            • 5.0.X

            #6
            Thank you for the response. Here is what I get:



            I'm not sure whether the problem could be upload_tmp_dir or not, but - based on this - I think it could be?
            Where could I change this directory?

            Best Regards.

            Comment

            • Lynne
              Former vBulletin Support
              • Oct 2004
              • 26255

              #7
              If the php.ini setting for 'upload_tmp_dir' is empty (like you are showing) then It's possible you (as root) or your host will need to edit php.ini and set 'upload_tmp_dir' to point to the full path to a directory on the server that is chmod'd to 1777. You will also need to restart Apache after making this change.

              Please don't PM or VM me for support - I only help out in the threads.
              vBulletin Manual & vBulletin 4.0 Code Documentation (API)
              Want help modifying your vbulletin forum? Head on over to vbulletin.org
              If I post CSS and you don't know where it goes, throw it into the additional.css template.

              W3Schools <- awesome site for html/css help

              Comment

              • BirdOPrey5
                Senior Member
                • Jul 2008
                • 9613
                • 5.6.3

                #8
                Also, 2MB is a relatively small max PHP max upload size. If your images are small web graphics that is more than enough, but if your images are photos straight from a modern digital camera that won't be enough.

                Comment

                • Reestv
                  New Member
                  • Apr 2011
                  • 21
                  • 5.0.X

                  #9
                  Thank you for the responses.

                  I have created a 'tmp' folder in my /var/www directory and have chmod'd it to 1777.
                  I then changed php.ini to this location and bumped up the max file size to 20MB as recommended.
                  I then restarted Apache, but I'm still experiencing the same error when I try to upload images (broken image).

                  This is now my diagnostics:



                  If you have any suggestions I would greatly appreciate it.
                  Best Regards.

                  Comment

                  • Mark.B
                    vBulletin Support
                    • Feb 2004
                    • 24288
                    • 6.0.X

                    #10
                    I notice the site in your license is an IP address, but your actual site, although accessible from the IP address, does use a domain name.

                    Note that the two are not interchangeable...whatever you have set as the site URL in the AdminCP is the only one you should use to access the site.

                    Not sure if this is your issue, but it's the first thing I spotted...don't use the IP address, anywhere.

                    As an aside, you should update your license with the correct address to remain fully compliant.
                    MARK.B
                    vBulletin Support
                    ------------
                    My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
                    My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

                    Comment

                    • Reestv
                      New Member
                      • Apr 2011
                      • 21
                      • 5.0.X

                      #11
                      Originally posted by Mark.B
                      I notice the site in your license is an IP address, but your actual site, although accessible from the IP address, does use a domain name.

                      Note that the two are not interchangeable...whatever you have set as the site URL in the AdminCP is the only one you should use to access the site.

                      Not sure if this is your issue, but it's the first thing I spotted...don't use the IP address, anywhere.

                      As an aside, you should update your license with the correct address to remain fully compliant.
                      My apologies. I used the IP as a temporary address until the domain had propagated but forgot to update it once completed.
                      This should now be updated.

                      The site in the AdminCP uses the domain and I am trialing the image upload via the same domain. This still fails to work, strangely.
                      Last edited by Reestv; Tue 12 Aug '14, 7:11am.

                      Comment

                      • Lynne
                        Former vBulletin Support
                        • Oct 2004
                        • 26255

                        #12
                        Do you get any errors in your error_logs (if you don't know where they are, ask your host) when you try to upload images?

                        Please don't PM or VM me for support - I only help out in the threads.
                        vBulletin Manual & vBulletin 4.0 Code Documentation (API)
                        Want help modifying your vbulletin forum? Head on over to vbulletin.org
                        If I post CSS and you don't know where it goes, throw it into the additional.css template.

                        W3Schools <- awesome site for html/css help

                        Comment

                        • Reestv
                          New Member
                          • Apr 2011
                          • 21
                          • 5.0.X

                          #13
                          There was no file path for the PHP error_logs, so I created one and restarted Apache (/var/log/php-scripts.log).
                          I then published a post with a broken image, but no error file was created by PHP. I assume this means that there were no errors?

                          Update: I'm not sure if this helps but,
                          Click image for larger version

Name:	Capture.PNG
Views:	174
Size:	9.7 KB
ID:	4120960

                          It seems to keep adding "Photos by Rees in image test" every time I open the broken image up again.
                          This issue fixes itself if I refresh the page.
                          Last edited by Reestv; Tue 12 Aug '14, 11:25am.

                          Comment

                          • Reestv
                            New Member
                            • Apr 2011
                            • 21
                            • 5.0.X

                            #14
                            Sorry to bump again, but I'm still having issues with this.

                            Comment

                            • Lynne
                              Former vBulletin Support
                              • Oct 2004
                              • 26255

                              #15
                              Try settings AdminCP > Settings > Options > Image Options > Image Library to none and then upload a jpeg image and see if you have problems.

                              Do you have suhosin or mod_security on the server?

                              Is you cookie prefix exactly the same in both config.php files?

                              Did you make sure to use a plain text editor such as notepad++ when editing the config.php files (if not, you could have a BOM in there causing issues)?

                              Please don't PM or VM me for support - I only help out in the threads.
                              vBulletin Manual & vBulletin 4.0 Code Documentation (API)
                              Want help modifying your vbulletin forum? Head on over to vbulletin.org
                              If I post CSS and you don't know where it goes, throw it into the additional.css template.

                              W3Schools <- awesome site for html/css help

                              Comment

                              Related Topics

                              Collapse

                              Working...