Upload failed due to failure writing temporary file.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mickknutson
    Senior Member
    • Jan 2004
    • 257
    • 3.6.x

    Upload failed due to failure writing temporary file.

    I was trying to upload an avatar from a remote URL and get this error:


    Warning
    : tempnam() [function.tempnam]: open_basedir restriction in effect. File() is not within the allowed path(s): (/home/baselo5:/usr/lib/php:/usr/local/lib/php:/tmp) in /includes/class_upload.php on line 346

    Where is the temp DIR?
    Thank You...Mick Knutson

    BLiNC Magazine Forums: "Everything you ever wanted to know about BASE-Jumping, but didn't know whom to ask."

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

    #2
    Most likely /tmp.

    You can point vBulletin to another temporary location under vBulletin Options -> Server Settings and Optimization Options.

    Create directory call tmp and CHMOD it 0777 within your account and point vBulletin to it. You might also need to turn on Safe Mode within vBulletin.
    Translations provided by Google.

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

    Comment

    • jasonlitka
      Senior Member
      • Mar 2006
      • 1489
      • 4.0.x

      #3
      /tmp should be set to 1777 not 0777.
      Jason Litka - Utter Ramblings

      Comment

      • mickknutson
        Senior Member
        • Jan 2004
        • 257
        • 3.6.x

        #4
        I did that in /home/baselo5:

        drwxrwxrwx 9 baselo5 baselo5 1024 Nov 26 14:25 tmp/

        /home/baselo5/tmp/vbulletin

        drwxrwxrwt 2 baselo5 baselo5 1024 Nov 26 14:25 vbulletin/


        And then I changed my "Safe Mode Temporary Directory" settings to point to /home/baselo5/tmp/vbulletin

        But then thought, I m not running in Safe Mode.

        So again, why am I getting this error:

        Warning: tempnam() [function.tempnam]: open_basedir restriction in effect. File() is not within the allowed path(s): (/home/baselo5:/usr/lib/php:/usr/local/lib/php:/tmp) in /includes/class_upload.php on line 346


        Thank You...Mick Knutson

        BLiNC Magazine Forums: "Everything you ever wanted to know about BASE-Jumping, but didn't know whom to ask."

        Comment

        • mickknutson
          Senior Member
          • Jan 2004
          • 257
          • 3.6.x

          #5
          This is still an issue. I am on a VPS but I am NOT running in safe_mode...
          Thank You...Mick Knutson

          BLiNC Magazine Forums: "Everything you ever wanted to know about BASE-Jumping, but didn't know whom to ask."

          Comment

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

            #6
            But you are running open_basedir restrictions. Enable phpinfo in the Admin CP, then provide the URL to your forums. This may help us troubleshoot this problem.

            Admin CP -> vBulletin Options -> Server Settings and Optimization Options -> Public phpinfo() Display Enabled
            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

            • mickknutson
              Senior Member
              • Jan 2004
              • 257
              • 3.6.x

              #7
              Done:

              Wingsuit basejumping, BASE jumping and base jump fatality:: Involving the use of a parachute or the sequenced use of a wingsuit and parachute to jump from fixed objects -- Everything you ever wanted to know about base-jumping, but didn't know whom to ask.
              Thank You...Mick Knutson

              BLiNC Magazine Forums: "Everything you ever wanted to know about BASE-Jumping, but didn't know whom to ask."

              Comment

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

                #8
                You have open_basedir restrictions on your server. To get uploads to work you need to create a 'tmp' subdirectory under your /home/baselo5 directory and chmod it to 777. Then in the Admin CP set "Upload In Safe Mode?" to 'Yes' and point the "Safe Mode Temp Directory" to that directory. If you placed the tmp directory in the right place, the path to the Safe Mode Temp Directory will be:

                /home/baselo5/tmp

                Also the php.ini setting for 'upload_tmp_dir' is empty. 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.
                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

                • nightbloom
                  New Member
                  • Mar 2008
                  • 18
                  • 3.8.x

                  #9
                  Originally posted by Steve Machol
                  You have open_basedir restrictions on your server. To get uploads to work you need to create a 'tmp' subdirectory under your /home/baselo5 directory and chmod it to 777. Then in the Admin CP set "Upload In Safe Mode?" to 'Yes' and point the "Safe Mode Temp Directory" to that directory. If you placed the tmp directory in the right place, the path to the Safe Mode Temp Directory will be:

                  /home/baselo5/tmp

                  Also the php.ini setting for 'upload_tmp_dir' is empty. 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.
                  Not all of us own our own server, why do you have such a basic function such as uploading a file from a URL like this? My host will not completely restart apache just so I can upload an avatar....

                  Comment

                  • TheNewOne
                    Senior Member
                    • Aug 2011
                    • 1033
                    • 4.2.5

                    #10
                    Originally posted by nightbloom
                    Not all of us own our own server, why do you have such a basic function such as uploading a file from a URL like this? My host will not completely restart apache just so I can upload an avatar....
                    4 year old post

                    Comment

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