PHP file_exists is lying to me (saying file exists but it doesnt)
<p>Doing this:</p>

<pre><code>php -r 'unlink("path"); clearstatcache(); echo file_exists("path");'
</code></pre>

<p>Where path is a full absolute path to a file on my linux machine.  Command is returning '<code>1</code>' even though the file is clearly not there.  You can run this command a million times, it will always tell you the file is there.</p>

<p>Running:</p>

<pre><code>ls path
</code></pre>

<p>Tells you there's no such file.</p>

<p>what gives?</p>

<p>Update:
I know about clearstatcache().  That does not help in this case.  Additionally, I'm running this with the cli.  Nothing changes from run to run.  I'm also on a 64-bit VM running ubuntu 11.10.</p>

<p>Path is just a path on the filesystem: /var/www/yo.txt.  www is a nfs shared mount, not sure if that has something to do with it.  The file was removed from a remote machine, but the local machine seems to know its not there.  'ls' on the directory shows no files, and ls with the path claims says that the file is not there.  The file was just a few kb, nothing huge.</p>
