title: Unable to create a temporary file while uploading
body: <p>While trying to upload a file using a form and PHP/IIS 7, I get this message:</p>
  
  <pre><code>PHP Warning:  File upload error - unable to create a temporary file in Unknown on line 0
  </code></pre>
  
  <p>My form:</p>
  
  <pre><code>&lt;form action="acciones.php" id="form3" method="POST" enctype="multipart/form-data"&gt;
      &lt;input type="hidden" value="3" name="accion"&gt;
      &lt;input type="text" name="nombre" placeholder="Nombre"&gt;
          &lt;input type="file" name="imagen" accept="image/x-png, image/gif, image/jpeg" /&gt;
      &lt;input type="button" id="envio" class="button azul" value="Agregar" onclick="envios()"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><a href="https://stackoverflow.com/questions/450876/upload-image-to-server-using-php-store-file-name-in-a-mysql-database-with-othe">My PHP code and reference: </a></p>
  
  <pre><code>$target = "/images/";
  $target = $target . basename( $_FILES['imagen']['name']);
  //This gets all the other information from the form
  $name=$_POST['nombre'];
  $pic=($_FILES['imagen']['name']);
  
  //Writes the information to the database
  $query = "INSERT INTO Playeras (Nombre, Ruta) VALUES ('$name', $pic')";
  mysql_query($query, $conexion -&gt; conn) or die("Error: ".mysql_error()) ;
  
  //Writes the photo to the server
  if(move_uploaded_file($_FILES['imagen']['tmp_name'], $target))
  {
      //Tells you if its all ok
      echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded, and your information has been added to the directory";
  }
  else 
  {
   //Gives and error if its not
   echo "Sorry, there was a problem uploading your file.";
  }
  </code></pre>
  
  <p>I've set the path for the temp files:</p>
  
  <pre><code>upload_tmp_dir = "C:/Users/server/Pictures/tmp"
  </code></pre>
  
  <p>And gave permissions for IIS_IUSRS and IUSRS with total control. But every time, I get the error. I don't know what I'm doing wrong. If someone can help me, it would be great.</p>