title: PHP file upload always returns MIME type "inode/x-empty"
body: <p>So I have a function that uploads terms &amp; conditions to a folder. I fetch the extension and MIME type of the file and check if they are valid. As of recently, all files I upload return <code>$_FILES[$key]['size']</code> as <code>0</code> while the files on the local disk do have a file size. When I check the MIME type using the following script, it always returns <code>inode/x-empty</code>.</p>
  
  <pre><code>$finfo    = finfo_open(FILEINFO_MIME_TYPE);
  $fileType = finfo_file($finfo, $file['tmp_name']); // Returns 'inode/x-empty'
  $expl     = explode('.', $file['name']);
  $fileExt  = end($expl);
  </code></pre>
  
  <p>I can't seem to figure out why this is happening as it didn't a couple of months back. I've never seen this happen before either.</p>
  
  <p>Below is an example of the $_FILES output:</p>
  
  <pre><code>Array
  (
      [name] =&gt; audite_marlow_logo.jpg
      [type] =&gt; image/jpeg
      [tmp_name] =&gt; /tmp/phpcHbiLN
      [error] =&gt; 0
      [size] =&gt; 0
  )
  </code></pre>
  
  <p>The server's php.ini is more than capable of handling any files I upload. The <code>post_max_size</code> is set to an insane <code>128M</code>.</p>
  
  <p>All the files I upload return with an <code>error</code> with an integer value of <code>0</code>.</p>
  
  <p>I am honestly lost as to why this is happening.</p>