Announcement

Collapse
No announcement yet.

Upload failed due to failure writing temporary file.

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

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


  • #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 customization and demonstration site.
    vBulletin 5 Documentation - Updated every Friday. Report issues here.
    vBulletin 5 API - Full / Mobile
    I am not currently available for vB Messenger Chats.

    Comment


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

      Comment


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


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


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


            • #7
              Done:

              http://www.blincmagazine.com/forum/index.php
              Thank You...Mick Knutson

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

              Comment


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


                • #9
                  Originally posted by Steve Machol View Post
                  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


                  • #10
                    Originally posted by nightbloom View Post
                    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...
                    X