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'm getting this every time I link to an image as my avatar. Causes?

    Also, this error comes up at the top of the screen: Warning: tempnam() [function.tempnam]: open_basedir restriction in effect. File() is not within the allowed path(s): ('.:/proc/uptime:/tmp:/home:/usr/local/lib/php:/usr/home:/usr/local/bin/') in [path]/includes/class_upload.php on line 275

  • #2
    You have open_basedir restrictions on your server. To get uploads to work you need to create a 'tmp' subdirectory under your 'home' 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/tmp

    Admin CP -> vBulletin Options -> Server Settings and Optimization Options -> Safe Mode Temporary Directory

    Admin CP -> vBulletin Options -> Server Settings and Optimization Options -> Safe Mode Upload Enabled -> Yes


    Also the php.ini setting for 'upload_tmp_dir' may be empty. It's possible 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


    • #3
      I have shared hosting.
      Thanks, that fixed it.

      Comment


      • #4
        I had the same issue for 4.0 and this fixed it as well. Many thanks!
        Discussion Forum

        Comment


        • #5
          same here! Thanks
          Sam
          DelmarvaFishing.com

          Comment


          • #6
            Hello, i have similar problem. Where exactly should i create "tmp" folder? Here is my path...

            CMD_FILE_MANAGER/domains/forum.mydomain.com/public_html

            Comment

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