title: PHP - filesize() returns an empty string
body: <p>I have a strange problem. I have an image which i need to upload to a file server. I 'm using php to do this. The image permissions are the following </p>
  
  <pre><code>-rw-r--r--. 1 apache apache  148041 Dec 22 08:25 Not.jpg
  </code></pre>
  
  <p>I checked that the file exists. I have downloaded the file and found it to be ok. it's original size is 60 KB. Permissions are also fine.</p>
  
  <p>When I do the following </p>
  
  <pre><code>$filepath = "../uploads/".$file_name;
  $image = fopen($filepath, "rb");
  echo file_exists($filepath).' ';
  echo filesize($filepath). 'bytes ';
  echo exif_read_data($filepath). ' ';
  </code></pre>
  
  <p>The output is 
      <code>1 bytes  200</code></p>
  
  <pre><code>1 - File Exists
  bytes - This is where the error occurs. filesize() is returning an empty string here
  200 - server response
  </code></pre>
  
  <p>What is the correct way to load this file ?</p>