Image Upload: The file you are trying to upload is corrupted.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Heiko Scharfenort
    Member
    • Jan 2015
    • 38
    • 5.1.x

    #46
    Found something out:

    Could you test this here: Change in PHP.ini the upload-tmp-dir to a folder in your website Root und and give the Write Perm. to this folder.

    e.g.

    ; Temporary directory for HTTP uploaded files (will use system default if not
    ; specified).
    ; http://php.net/upload-tmp-dir
    upload_tmp_dir ="C:\inetpub\wwwroot\temp"

    It seems, that this folder is used by the new mechanism. If you don't change, PHP takes c:\windows\temp and the browser doesn't have write permission.

    In my case, PHP don't want to change the folder - I don't know why - After adding the user: IUSR with write permissions to the c:\windows\temp folder the upload works!!!!!

    Could you test and confirm it?

    I will try to change the temp dir permantly in php.ini ...If I have some new, I will inform you...

    Last edited by Heiko Scharfenort; Sun 19 Feb '17, 6:09am.

    Comment

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

    #47
    vBulletin has always used the temp upload directory specified in php.ini and the web server user has to be able to write to it. However, that is a different issue than what is causing this problem for most customers.
    Translations provided by Google.

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

    Comment

    • judsonian
      New Member
      • Jun 2013
      • 22
      • 5.0.X

      #48
      Finally got this working.
      vBulletin Support suggested checking permissions on "C;/Windows/Temp" for the IIS service user account. This is the account set in PHP.INI for the temp upload directory. My permissions were correct but deleting the folder and rebuilding it using the exact same user accounts and permissions resolved my issue.

      Alternatively, you could create a new "C:/PHPTempUpload" directory and give it the permissions for the IIS service.

      Please post if this resolves your issue.

      Comment

      • rnedelkow
        Senior Member
        • May 2014
        • 214
        • 5.1.x

        #49
        I gave the temp directory full permissions for IIS_IUSRS as shown in the pic below. Should I reboot the server?

        Comment

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

          #50
          You shouldn't have to reboot the server after making permission changes. However, you should restart IIS from the IIS Manager to make sure any existing PHP Processes are shut down.
          Translations provided by Google.

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

          Comment

          • rnedelkow
            Senior Member
            • May 2014
            • 214
            • 5.1.x

            #51
            That did the trick. I restarted IIS and images are being uploaded inline and as attachments. Thanks!

            Comment

            • Ryu_gr
              New Member
              • Jul 2016
              • 20
              • 4.0.x

              #52
              Hello vbulletin team!

              I receive this specific error when i change PHP from Hostinger web server settings to 7.3 (or 7.4) as per your recommendation for VB5.

              The error "The file you are trying to upload is corrupted." appears when i try to place images on the posts.

              I run vBulletin 5.6.2 with Imagick (PHP extension) and LiteSpeed server.

              With PHP 7.2 the forum runs fine and images are uploaded without this error, but i would like to use PHP 7.3 since its faster and is recommended by you.

              Could you guess why PHP 7.3 brings that error and VB5 fails to upload images? I haven't noticed any other error with this version.
              Last edited by Ryu_gr; Sat 11 Jul '20, 12:34pm.

              Comment

              • Ryu_gr
                New Member
                • Jul 2016
                • 20
                • 4.0.x

                #53
                Also, another side effect upon downgrading from 7.3 to 7.2 in order to be able to upload images is that i had to reset the admin password because as an admin i received the following error:
                You do not have a valid password configured for your account. Please reset your password via the reset password link.

                And also upon password recovery i experienced the known issue described here (Invalid server response. Please try again.) but i indeed received the reset link on my email.

                Well looks like changing PHP version is not to be taken lightly
                Last edited by Ryu_gr; Sun 12 Jul '20, 5:54am.

                Comment

                • Ryu_gr
                  New Member
                  • Jul 2016
                  • 20
                  • 4.0.x

                  #54
                  Sorry for the triple post and the trouble. My hosting company informed me that they do not fully support Imagick in PHP 7.3 yet, so i'll stay with 7.2 for now.

                  Despite that, which option do you recommend using in vBulletin image processing settings? Imagick (PHP extension) or ImageMagick 6 which requires a path?

                  Comment

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

                    #55
                    You're replying to a topic that is three years old and may contain outdated advice.

                    I would recommend starting your own topic with full details of the problem, so we can advise appropriately.
                    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

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

                      #56
                      Originally posted by Ryu_gr
                      Also, another side effect upon downgrading from 7.3 to 7.2 in order to be able to upload images is that i had to reset the admin password because as an admin i received the following error:
                      You do not have a valid password configured for your account. Please reset your password via the reset password link.

                      And also upon password recovery i experienced the known issue described here (Invalid server response. Please try again.) but i indeed received the reset link on my email.

                      Well looks like changing PHP version is not to be taken lightly
                      This is most likely because your PHP 7.2 installation was not configured to use the Argon2ID Password Hashing Algorithms. This is the default in PHP 7.3 and higher. It is what vBulletin will use if available at the time the password is hashed due to its higher levels of security. When a password is hashed and stored, we also store the algorithm so we know how to compare it in the future. There is no way to switch passwords between algorithms because we never store the original password. To store the original password negates all security and the benefits of using secure hashing to begin with.
                      Translations provided by Google.

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

                      Comment

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

                        #57
                        Originally posted by Ryu_gr
                        Sorry for the triple post and the trouble. My hosting company informed me that they do not fully support Imagick in PHP 7.3 yet, so i'll stay with 7.2 for now.

                        Despite that, which option do you recommend using in vBulletin image processing settings? Imagick (PHP extension) or ImageMagick 6 which requires a path?
                        IMagick is the recommended image processing library across all supported versions of PHP as of July 13th, 2020. The ImageMagick 6 option will be removed in the near future.

                        IMagick does require that a PECL library is installed for PHP to work properly and you are still required to have a valid copy of ImageMagick 6 or 7 available on the server's path so PHP can find it. Your hosting provider must configure this. If they do not wish to do so, then you will need to use one of the other options.
                        Translations provided by Google.

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

                        Comment

                        Related Topics

                        Collapse

                        Working...