Reason for 'Invalid file content from specified image.'?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • medved
    Senior Member
    • Apr 2008
    • 168

    #16
    Originally posted by Zachery
    Find a better webhost. If they don't understand that they've misconfigured their servers that is a scary thing.
    Webhost is telling me this:
    Again, upload_tmp_dir is disabled as per our server configuration.Unfortunately, those items cannot be changed on the shared server. They are implemented as part of our security features on the shared platform. All of our shared platforms are configured this way. We have thousands of clients running various forums on their websites, with which they upload files. Unfortunately, the forum platform you are using is not compatible with our server configuration if it requires upload_tmp_dir be enabled. We would suggest a forum software that does not require this feature.

    So now either I have to start using another forum or buy VPS server and that one is much more expensive.
    Last edited by medved; Mon 6 Oct '14, 6:06pm.

    Comment

    • Zachery
      Former vBulletin Support
      • Jul 2002
      • 59097

      #17
      You should find another webhost. They are very wrong. They've given you access to /tmp in open_Basedir but they won't configure the upload_tmp_dir to be the correct directory? They're wrong.

      Comment

      • medved
        Senior Member
        • Apr 2008
        • 168

        #18
        Originally posted by Zachery
        You should find another webhost. They are very wrong. They've given you access to /tmp in open_Basedir but they won't configure the upload_tmp_dir to be the correct directory? They're wrong.
        I don't think changing the webhost will help. I think all shared webhost do the same thing, they all do that most likely as part of their security features on the shared platform. I think vB5 shouldn't require upload_tmp_dir being enabled. It is not good that vB5 can be run only on VPS. Small forums can't afford to pay for VPS.
        And it should be clearly stated, when ordering vB5, that it is for VPS only.
        Last edited by medved; Tue 7 Oct '14, 4:11am.

        Comment

        • medved
          Senior Member
          • Apr 2008
          • 168

          #19
          Originally posted by Zachery
          You should find another webhost. They are very wrong. They've given you access to /tmp in open_Basedir but they won't configure the upload_tmp_dir to be the correct directory? They're wrong.
          Ok now, there you have it. This is what the webhost responded to you:

          /tmp IS an allowed path on the server via open_basedir.

          Regarding the PHP setting:

          upload_tmp_dir : "Temporary directory for HTTP uploaded files (will use system default if not specified)."

          We do not specify it, and as a result of the default behavior (usage of /tmp) all applications can use and do use the system default of /tmp.

          VB is, apparently, not coded properly to handle PHP's default use of the system default (in this case /tmp) when upload_tmp_dir is not set.

          Please respond to their support and inquire why their code does not conform to the php.ini spec and PHP's default behaviors.

          As stated, we do not have this specified on any of our shared servers; this setting is not set by default on any installation of PHP.

          It is ONLY used if you want to MANUALLY override the location (99.9% people use /tmp and is why that is the default if you do not set it)

          I understand you are non-technical, however, as stated, we have thousands of clients using our services and not a single one has ever had this issue.

          The fact that the code provider is shrugging this off as our problem versus addressing the issue in their code (it would honestly be one line of code) would have me not looking for another host but rather looking for another forum software package.
          So please if the vB5 developers could take a second look at this problem. Thanks.

          Comment

          • Zachery
            Former vBulletin Support
            • Jul 2002
            • 59097

            #20
            Yes, while we should take that into account, and there are bugs to resolve that, they've created the problem for you TODAY.

            The upload_tmp_dir should be set to the correct path, so php applications know where they can write their files to. I don't understand how this is a security thing.

            We've been telling users that the upload_tmp_dir should be set for over a decade now, this isn't new.

            Comment

            • medved
              Senior Member
              • Apr 2008
              • 168

              #21
              Well the problem is not just today but since I've installed 5.1.3. Are the VB developers planing to fix it so it works also with the default directory?

              Comment

              • medved
                Senior Member
                • Apr 2008
                • 168

                #22
                i had someone to fix it and now it works. In case somebody else has the same problem, you can do this:

                /core/vb/utilities.php
                OLD LINE
                $filename = tempnam(ini_get('upload_tmp_dir'), $prefix);
                NEW LINE
                $filename = tempnam(sys_get_temp_dir(), $prefix);

                OLD LINE
                $filename = @tempnam(ini_get('upload_tmp_dir'), $prefix);
                NEW LINE
                $filename = tempnam(sys_get_temp_dir(), $prefix);

                OLD LINE
                $path = ini_get('upload_tmp_dir');
                NEW LINE
                $path = sys_get_temp_dir();

                only the video thumbnails are still black.
                Last edited by medved; Sat 11 Oct '14, 10:05am.

                Comment

                • Zachery
                  Former vBulletin Support
                  • Jul 2002
                  • 59097

                  #23
                  Your webhost should still fix the problem. That setting should be set correctly.

                  Comment

                  • medved
                    Senior Member
                    • Apr 2008
                    • 168

                    #24
                    I really don't think i can blame webhost for this issue. They always responded very quickly to my support tickets and I think they are a professional webhost company. Without them i wouldn't know that only a few lines of code needed to be changed to make it work. If VB conformed to the php.ini spec and PHP's default behaviours we wouldn't have this problem.

                    And for the black video thumbnails i think i will have to look again for help outside of VB because here on VB nobody knows how to fix it.

                    Comment

                    • Zachery
                      Former vBulletin Support
                      • Jul 2002
                      • 59097

                      #25
                      I really do think I can blame your webhost on this issue. They've incorrectly configured PHP and refuse to fix its configuration.

                      Comment

                      • Madsen1981
                        New Member
                        • Dec 2012
                        • 13
                        • 4.2.X

                        #26
                        Originally posted by medved
                        i had someone to fix it and now it works. In case somebody else has the same problem, you can do this:

                        /core/vb/utilities.php
                        OLD LINE
                        $filename = tempnam(ini_get('upload_tmp_dir'), $prefix);
                        NEW LINE
                        $filename = tempnam(sys_get_temp_dir(), $prefix);

                        OLD LINE
                        $filename = @tempnam(ini_get('upload_tmp_dir'), $prefix);
                        NEW LINE
                        $filename = tempnam(sys_get_temp_dir(), $prefix);

                        OLD LINE
                        $path = ini_get('upload_tmp_dir');
                        NEW LINE
                        $path = sys_get_temp_dir();

                        only the video thumbnails are still black.

                        Bump...
                        I'm also getting this error in vBulletin 5.1.3, not before. Too many getting this error to be a problem outside of vBulletin... I must be honest, I have never reinstalled a forum software as many times as this, and never gotten so many errors as with vB5. New errors with every update and version...

                        Any public fix for this or is it a ticket issue?

                        For now the fix in the quote works. But really, blaming the webhost when it's code inside the vb core directory that seems to be a problem and only since the newer version...
                        Last edited by Madsen1981; Wed 29 Oct '14, 7:06am.

                        Comment

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

                          #27
                          Originally posted by Madsen1981
                          For now the fix in the quote works. But really, blaming the webhost when it's code inside the vb core directory that seems to be a problem and only since the newer version...
                          The fix is for the webhost to configure php correctly, rather than waiting for vBulletin to re-code part of its software to cover for incompetent hosts.

                          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

                          • FBlack-HPath
                            New Member
                            • Sep 2013
                            • 16
                            • 5.0.X

                            #28
                            So, aside from snarky responses about webhost doing things 'correctly' what precisely can someone like me, who is still having this problem with attachments, tell the webhost to do in order to have attachments function correctly?

                            I just need a clear (ideally friendly) message I can pass along so that the configuration is done right on their end.

                            Comment

                            • Zachery
                              Former vBulletin Support
                              • Jul 2002
                              • 59097

                              #29
                              Ask them to properly configure the setting, by setting it to a valid path for your webserver.

                              Comment

                              Related Topics

                              Collapse

                              Working...