title: php file_get_contents("/tmp/some_file") not working php7.1
body: <p>I'm having a weird issue with reading the <code>/tmp/some_file</code> file.</p>
  
  <ul>
  <li>My PHP Version is <strong>7.1.13-1+ubuntu16.04.1+deb.sury.org+1</strong> </li>
  <li><p>Server version: Apache/2.4.29 (Ubuntu) Server built:   2018-01-14T11:23:59</p></li>
  <li><p>File <code>/tmp/some_file</code> is <code>0777</code> for sure !</p></li>
  </ul>
  
  <p>But <code>file_exists("/tmp/some_file")</code> or <code>file_get_contents("/tmp/some_file")</code> are both returning <strong>false</strong></p>
  
  <p>I have tried</p>
  
  <pre><code>$data =  file_get_contents("/tmp/some_file");
  var_dump($data); //is false
  
  // OR even this code outputs: Unable to open the file!
  $myfile = fopen("/tmp/some_file", "r") or die("Unable to open the file!");
  echo fread($myfile,filesize("/tmp/some_file"));
  fclose($myfile);
  </code></pre>
  
  <p>None of above codes works and I don't get any error messages.
  When I execute PHP code with the <code>www-data</code> user in terminal using the <code>php -a</code> mode or directly run <code>php myfile.php</code> all of the above functions are working fine and the file normally gets read.</p>
  
  <p>Is there any effective way to debug this or it is somehow related to the PHP version?</p>
  
  <p><strong>--- Update ---</strong></p>
  
  <p>After some digging, I discovered that file located in any other directly read normally. Seems problem is with the <code>/tmp</code> directory but <code>is_readable("/tmp")</code> returns true and <code>file_exists("/tmp/some_file")</code> returns still false ... </p>