Announcement

Collapse
No announcement yet.

Uploaded images are broken

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

  • 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.

  • #2
    Are you storing images in the database, or the file system?
    MARK.B | vBULLETIN SUPPORT

    TalkNewsUK - My vBulletin 5.6.3 Demo
    AdminAmmo - My Cloud Demo

    Comment


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

      Comment


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

        Best Regards.

        Comment


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

          Comment


          • #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


            • #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


              • #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


                • #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


                  • #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

                    TalkNewsUK - My vBulletin 5.6.3 Demo
                    AdminAmmo - My Cloud Demo

                    Comment


                    • #11
                      Originally posted by Mark.B View Post
                      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, 8:11am.

                      Comment


                      • #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


                        • #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:	114
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, 12:25pm.

                          Comment


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

                            Comment


                            • #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...
                              X