title: PHP upload file code works on Windows XAMPP but not on production Linux box
body: <p>I'm using this PHP to upload CSV files:</p>
  
  <pre><code>$mimes = array('application/vnd.ms-excel','text/plain','text/csv','text/tsv');
  if ( in_array($_FILES['file']['type'],$mimes)  &amp;&amp; ($_FILES["file"]["size"] &lt; 20000)  )
      {
          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;";
              move_uploaded_file($_FILES["file"]["tmp_name"],
              "csv/" . $_FILES["file"]["name"]);
              echo "Stored in: " . "csv/" . $_FILES["file"]["name"];
  
          }
      }
      else
      {
          echo "Invalid file";
      }
  </code></pre>
  
  <p>and it works perfectly on my dev XAMPP setup. </p>
  
  <p>When I deploy the site on the Linux box it behaves as if the file upload is successful but it isn't in the desired folder or tmp folder.</p>
  
  <p>My form is:</p>
  
  <pre><code>&lt;form action="upload_file.php" 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;
  </code></pre>
  
  <p>My browser returns from the echos:</p>
  
  <pre><code>Upload: rere.csv
  Type: application/vnd.ms-excel
  Size: 2.34375 kB
  Temp file: /tmp/php5XXT5v
  Stored in: csv/rere.csv
  </code></pre>
  
  <p>I had a friend more familiar with Linux look at this and he has written a few upload scripts. We couldn't figure out a solution.</p>
  
  <p>Any hints?</p>