title: File upload not working
body: <p>I installed wordpress in a media temple server and noticed that couldn't upload files. After tryng several solutions decided to replicate the problem with a simple script (<a href="http://pastie.org/2349720" rel="nofollow">http://pastie.org/2349720</a>).</p>
  
  <pre><code>&lt;?php
  if($_FILES)
          print_r($_FILES);
  if ((($_FILES["file"]["type"] == "image/gif")
  || ($_FILES["file"]["type"] == "image/jpeg")
  || ($_FILES["file"]["type"] == "image/png")
  || ($_FILES["file"]["type"] == "image/pjpeg"))
  &amp;&amp; ($_FILES["file"]["size"] &lt; 200000))
    {
    if ($_FILES["file"]["error"] &gt; 0)
      {
      echo "Return Code: " . $_FILES["file"]["error"] . "&lt;br /&gt;";
      }
    else
      {
      echo "Upload: " . $_FILES["file"]["name"] . "&lt;br /&gt;";
      echo "Type: " . $_FILES["file"]["type"] . "&lt;br /&gt;";
      echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb&lt;br /&gt;";
      echo "Temp file: " . $_FILES["file"]["tmp_name"] . "&lt;br /&gt;";
  
      if (file_exists("uploads/" . $_FILES["file"]["name"]))
        {
        echo $_FILES["file"]["name"] . " already exists. ";
        }
      else if (!file_exists($_FILES["file"]["tmp_name"]))
        {
        echo 'temp file doesn\'t exists';
        }
      else
        {
        $uploaded=move_uploaded_file($_FILES["file"]["tmp_name"],
        $_FILES["file"]["name"]);
        if($uploaded)
          echo "Stored in: " . "uploads/" . $_FILES["file"]["name"];
        else
          echo "fallo la carga del archivo";
        }
      }
    }
  else
    {
    echo "Invalid file";
    }
  ?&gt;
  
  &lt;html&gt;
  &lt;body&gt;
  
  &lt;form action="" method="post"
  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;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Looks like move_upload_file() is returning false without a warning or error, looked in php documentation and found this</p>
  
  <blockquote>
    <p>If filename is not a valid upload file, then no action will occur, and
    move_uploaded_file() will return FALSE.</p>
  </blockquote>
  
  <p>I've checked and the file upload doesn't report any errors and the temporary file exist before trying to move it. Already set 777 permission in folder and still not having any luck, any idea on what can be causing this behavior and how to fix it?</p>
  
  <p>thanks.</p>