No announcement yet.

Upload failed due to failure writing temporary file.

  • Filter
  • Time
  • Show
Clear All
new posts

  • [Forum] Upload failed due to failure writing temporary file.

    I tried adding an avatar via URL but it gave me an error code on the top of my site:

    PHP Code:
    Warningfopen() [function.fopen]:  open_basedir restriction in effectFile(/tmp/vbupload18653is not  within the allowed path(s):  (/var/.../.../.../ in [path]/includes/class_upload.php  on line 281 
    vBulletin Message

    Upload failed due to failure writing temporary file.
    Can someone please help me to fix this issue? I don't have that much PHP knowledge so explain things the easy way please.

    I use vB 4.0.3.

  • #2
    Had the same issue. Here's my thread and the fix...
    I drank WHAT?! - Socrates


    • #3
      1 of the steps to fix this is to enable phpinfo but when I do this and then go to Maintenance > View PHP Info it gives me this error:

      Warning: phpinfo() has been disabled for security reasons in [path]/admincp/index.php on line 1125
      Line 1125:
      <script type="text/javascript" src="<?php echo $versionhost; ?>/version.js?v=<?php echo SIMPLE_VERSION; ?>&amp;id=VBF817202F"></script>
      And what exactly should I tell my host to modify in the php.ini file?
      Last edited by; Wed 14 Apr '10, 4:36pm.


      • #4
        upload_tmp_dir is the value that needs to be set. The directory should also have permissions of 0777.
        I drank WHAT?! - Socrates


        • #5
          I described my host the problem and told them to activate upload_tmp_dir in the php.ini.
          It works now.


          • #6
            I fixed it via vbulletin without having to contact my host, although I'm not sure if it's the most secure fix. Here is my thread


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