title: Can't create temporary file in PHP despite the temp directory exists
body: <p>i'm making a site that allow the user to upload images. 
  When I make the call to the $_FILE variable in order to move the image to another directory it does nothing. Checking the $_FILE with print_r shows the next information:</p>
  
  <pre><code>(
      [pic1] =&gt; Array
          (
              [name] =&gt; pic1
              [type] =&gt; 
              [tmp_name] =&gt; 
              [error] =&gt; 6
              [size] =&gt; 0
          )
  
  )
  </code></pre>
  
  <p>The error 6 seems to be <a href="http://php.net/manual/en/features.file-upload.errors.php" rel="nofollow">this</a></p>
  
  <pre><code>UPLOAD_ERR_NO_TMP_DIR
  
  Value: 6; Missing a temporary folder. Introduced in PHP 5.0.3.
  </code></pre>
  
  <p>But I have a big problem: I can access only to the directory where I put the files, I can't check if the temp directory exists or check the php.ini (The server is from my client, and he can't give me access to other directories) </p>
  
  <p>Fortunately the client is checking these parameters and telling me how they are.
  So, the temporary directory (upload_tmp_dir) is set to /tmp
  The /tmp directory actually exists, and have all the permissions:</p>
  
  <pre><code>drwxrwxrwt 34 root root 2832 2014-08-30 00:00 tmp
  </code></pre>
  
  <p>I've been searching reasons of why it shows the error of "Missing temporary folder" despite it exists, but i can't find a reason or a solution. I leave <a href="http://pastebin.com/KkMLGuVw" rel="nofollow">here a pastebin with the output of ini_get_all()</a></p>
  
  <p>If you can comment any possible solution i'll be grateful. Thanks.</p>