title: PHP - Fileuploads, ['tmp_name'] doesn't exists physically
body: <p>This is some very basic stuff.
  For a unknown reason i can't upload files via a standard HTML+PHP upload form.</p>
  
  <p>The file doesn't exists locally under /tmp</p>
  
  <h2>php.ini</h2>
  
  <pre><code>;;;;;;;;;;;;;;;;
  ; File Uploads ;
  ;;;;;;;;;;;;;;;;
  
  ; Whether to allow HTTP file uploads.
  ; http://php.net/file-uploads
  file_uploads = On
  
  ; Temporary directory for HTTP uploaded files (will use system default if not
  ; specified).
  ; http://php.net/upload-tmp-dir
  upload_tmp_dir = /tmp/
  
  ; Maximum allowed size for uploaded files.
  ; http://php.net/upload-max-filesize
  upload_max_filesize = 30M
  
  ; Maximum number of files that can be uploaded via a single request
  max_file_uploads = 20
  
  ; open_basedir, if set, limits all file operations to the defined directory
  ; and below.  This directive makes most sense if used in a per-directory
  ; or per-virtualhost web server configuration file. This directive is
  ; *NOT* affected by whether Safe Mode is turned On or Off.
  ; http://php.net/open-basedir
  open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/
  
  ; Maximum size of POST data that PHP will accept.
  ; Its value may be 0 to disable the limit. It is ignored if POST data reading
  ; is disabled through enable_post_data_reading.
  ; http://php.net/post-max-size
  post_max_size = 8M
  </code></pre>
  
  <h2>upload code (resides in the same file as the html form, index.php)</h2>
  
  <pre><code>print '&lt;pre&gt;';
  print var_dump($_FILES);
  print var_dump(is_uploaded_file($_FILES["file"]["tmp_name"]));
  print is_writable('/tmp');
  print '&lt;/pre&gt;';
  </code></pre>
  
  <h2>html</h2>
  
  <pre><code>&lt;form method="post" action="./" enctype="multipart/form-data"&gt;
      &lt;label for="file"&gt;Filename:&lt;/label&gt;
      &lt;input type="file" name="file" id="file"&gt;&lt;br&gt;
      &lt;input type="submit" name="submit" value="Submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <h2>And my output is:</h2>
  
  <pre><code>array(1) {
    ["file"]=&gt;
    array(5) {
      ["name"]=&gt;
      string(11) "test.jpg"
      ["type"]=&gt;
      string(10) "image/jpeg"
      ["tmp_name"]=&gt;
      string(14) "/tmp/php66JkW8"
      ["error"]=&gt;
      int(0)
      ["size"]=&gt;
      int(75766)
    }
  }
  bool(true)
  1
  </code></pre>
  
  <h2>permissions and info about the file:</h2>
  
  <pre><code>[torxed@archie http]$ ls -l / | grep tmp
  drwxrwxrwt   9 root root   220 Sep 26 13:34 tmp
  
  [torxed@archie http]$ ls -lh /home/torxed/ | grep test
  -rw-r--r--  1 torxed users  74K Sep 26 13:08 test.jpg
  </code></pre>