Upload of file failed

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • stitch
    Senior Member
    • May 2004
    • 184
    • 3.0.9

    Upload of file failed

    Hello All,

    I recently intall 3.5.0 on my test server and start testing it. This is the error that I got when I try to upload avatar using the avatar option under usercp

    Upload of file failed.
    Would you please show me how to fix this

    Thanks
    Family means No One Gets Left Behind
    or.. Forgotten
  • Steve Machol
    Former Customer Support Manager
    • Jul 2000
    • 154488

    #2
    Are you storing avatars in the database or file system?

    Run the Upload Diagnostics and report back the results:

    Admin CP -> Import & Maintenance -> Diagnostics -> Upload

    Also, in the Admin CP, open the Server Settings and Optimization Options section and turn on the Public phpinfo() Display Enabled setting. Then provide the URL to your forums. This may help us troubleshoot this problem.
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment

    • IceBurn3000
      New Member
      • Jan 2005
      • 15
      • 3.6.x

      #3
      I am getting the same error using a clean install of Beta 3.

      When I run the Upload Diagnostics i get:

      Help
      Pertinent PHP Settings
      file_uploads: On
      open_basedir: /home/n/neway/:/usr/local/lib/php
      safe_mode: On
      upload_tmp_dir: /tmp/php_upload
      upload_max_filesize: 5.00 MB

      Results
      The attached file's temporary location (/tmp/php_upload/php9HElb3) could not be found. The test cannot continue.

      In the vB Options, I have Safe Mode uploads enabled and the /tmp folder is CHMOD 777.

      Any suggestions to fix this.

      Thanks,

      Peter
      Peter B
      YOUthCentral Site Owner
      [MSN: IceBurn3000 (at) hotmail (dot) com]
      [Email: peter (at) YOUthCentral (dot) net]
      [Web: http://www.YOUthCentral.net - It's Where YOUth Go!]

      Comment

      • Steve Machol
        Former Customer Support Manager
        • Jul 2000
        • 154488

        #4
        Change the safe mode temp directory to /tmp/php_upload/

        If you still have this problem then you need to create a /tmp/php_upload/ directory on this server and chmod it to 777.
        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
        Change CKEditor Colors to Match Style (for 4.1.4 and above)

        Steve Machol Photography


        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


        Comment

        • IceBurn3000
          New Member
          • Jan 2005
          • 15
          • 3.6.x

          #5
          Done & Done --> It's Still not working!
          Peter B
          YOUthCentral Site Owner
          [MSN: IceBurn3000 (at) hotmail (dot) com]
          [Email: peter (at) YOUthCentral (dot) net]
          [Web: http://www.YOUthCentral.net - It's Where YOUth Go!]

          Comment

          • Steve Machol
            Former Customer Support Manager
            • Jul 2000
            • 154488

            #6
            If you did what I suggested then it really should work. What's the new error message?
            Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
            Change CKEditor Colors to Match Style (for 4.1.4 and above)

            Steve Machol Photography


            Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


            Comment

            • IceBurn3000
              New Member
              • Jan 2005
              • 15
              • 3.6.x

              #7
              Error Msg: The attached file's temporary location (/tmp/php_upload/php90cP4O) could not be found. The test cannot continue.

              Could it have something to do as to whether the uploads are stored in the database or file system?
              Peter B
              YOUthCentral Site Owner
              [MSN: IceBurn3000 (at) hotmail (dot) com]
              [Email: peter (at) YOUthCentral (dot) net]
              [Web: http://www.YOUthCentral.net - It's Where YOUth Go!]

              Comment

              • Steve Machol
                Former Customer Support Manager
                • Jul 2000
                • 154488

                #8
                This error still means that there is no /tmp/php_upload directory on this server, or it is not chmod'd to 777. You need to make this a root directory on the server, not a subdirectory of your website, and you need to have root access to the server to do this.
                Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                Change CKEditor Colors to Match Style (for 4.1.4 and above)

                Steve Machol Photography


                Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                Comment

                • IceBurn3000
                  New Member
                  • Jan 2005
                  • 15
                  • 3.6.x

                  #9
                  Steve,
                  I have been sending emails back and forth with my hosting company. This is there response:

                  The /tmp/php_upload directory is there and is writable. The script is probably checking whether the permissions are 777. Technically the
                  permissions are not 777 but the directory is writable. I logged onto
                  one of the servers in the cluster and there are files in there
                  suggesting people are actively using it.
                  What do you suggest I do?
                  Peter B
                  YOUthCentral Site Owner
                  [MSN: IceBurn3000 (at) hotmail (dot) com]
                  [Email: peter (at) YOUthCentral (dot) net]
                  [Web: http://www.YOUthCentral.net - It's Where YOUth Go!]

                  Comment

                  • Steve Machol
                    Former Customer Support Manager
                    • Jul 2000
                    • 154488

                    #10
                    You did set /tmp/php_upload as your Safe Mode directory and turned safe mode on, correct?

                    Assumiing that is the case, then if that diirectory existed and was world-readable and writable, then you would not get this error.

                    I'm afraid you are at the mercy of your host who does not seem to be able or willing to resolve this for you. There is nothing you or I can do. Only your host can fix this.
                    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                    Change CKEditor Colors to Match Style (for 4.1.4 and above)

                    Steve Machol Photography


                    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                    Comment

                    • IceBurn3000
                      New Member
                      • Jan 2005
                      • 15
                      • 3.6.x

                      #11
                      Okay, they have said that they cannot set the /tmp/php_upload dir to 777.

                      Originally posted by From my hosting company
                      I noticed in the admin area that it has the option for safe mode which is already on. The temp directory was set to the standard /tmp/php_upload though so I changed that to /home/n/neway/www/images/temp and set the permissions to 777 on that directory. However it still had problems which I thought was strange.

                      Uploading files in PHP will definitely work if done correctly under safe mode. I'd assume the code must do some check on the file to see if it's valid and if it is trying to do this whilst the file is in the /tmp/php_upload dir then it will have permissions problems.
                      My host wants to know why, in vBulletin Options --> Server Settings & Optimisation Options, when we set the Safe Mode dir to /home/n/neway/www/images/temp (which is in my hosting root, and chmod'd to 777) vB still tries to use /tmp/php_upload .

                      The explanation of the field is "If your server is running in PHP Safe Mode, you'll need to specify a directory that is CHMOD to 777 that will act as a temporary directory for uploads. All files are removed from this directory after database insertion."

                      I mean, if vB reads the temp upload folder straight out of php.ini what is the point of having this option. It is kinda redundant, is it not? When we set this setting to /home/n/neway/www/images/temp and run the diagnostic, it goes to /tmp/php_upload . Is this perhaps a bug or is it operating as it should?

                      Thanks for you help so far!

                      Thanks,
                      Last edited by IceBurn3000; Sat 9 Jul '05, 4:55am.
                      Peter B
                      YOUthCentral Site Owner
                      [MSN: IceBurn3000 (at) hotmail (dot) com]
                      [Email: peter (at) YOUthCentral (dot) net]
                      [Web: http://www.YOUthCentral.net - It's Where YOUth Go!]

                      Comment

                      • Steve Machol
                        Former Customer Support Manager
                        • Jul 2000
                        • 154488

                        #12
                        The reason is because their server is using /tmp/php_upload as the server temp directory. Only they can fix this. Form post #3:

                        upload_tmp_dir: /tmp/php_upload
                        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                        Change CKEditor Colors to Match Style (for 4.1.4 and above)

                        Steve Machol Photography


                        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                        Comment

                        • AZone
                          Senior Member
                          • Nov 2002
                          • 146
                          • 4.0.0

                          #13
                          What should I do if I have upload_tmp_dir: No?

                          Comment

                          • Steve Machol
                            Former Customer Support Manager
                            • Jul 2000
                            • 154488

                            #14
                            AZone, please start your own thread with all the relevant details. Thanks..
                            Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                            Change CKEditor Colors to Match Style (for 4.1.4 and above)

                            Steve Machol Photography


                            Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                            Comment

                            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                            Working...