title: PHP:is_file() and file_exists() return different results on same file
body: <p>I am having an issue where file_exists returns false and is_file returns true.</p>
  
  <pre><code>echo(getmygid()." = gid\n"); //501
  echo(getmyuid()." = uid\n"); //501
  echo(posix_getgid()." = pgid\n"); //501
  echo(posix_getuid()." = puid\n"); //501
  var_dump(file_exists("/home/www/public_html/")); //bool(true)
  var_dump(file_exists("/home/www/public_html/index.html")); //bool(false)
  var_dump(is_file("/home/www/public_html/index.html")); //bool(true)
  
  var_dump(stat("/home/www/public_html/index.php")); 
  </code></pre>
  
  <p>The output is:</p>
  
  <pre><code>501 = gid
  501 = uid
  501 = pgid
  501 = puid
  bool(true)
  bool(false)
  bool(true)
  array(26) {
    [0]=&gt;
    int(51712)
    [1]=&gt;
    int(58055)
    [2]=&gt;
    int(33197)
    [3]=&gt;
    int(1)
    [4]=&gt;
    int(501)
    [5]=&gt;
    int(501)
    [6]=&gt;
    int(0)
    [7]=&gt;
    int(473)
    [8]=&gt;
    int(1323573973)
    [9]=&gt;
    int(1323573973)
    [10]=&gt;
    int(1323574039)
    [11]=&gt;
    int(4096)
    [12]=&gt;
    int(8)
    ["dev"]=&gt;
    int(51712)
    ["ino"]=&gt;
    int(58055)
    ["mode"]=&gt;
    int(33197)
    ["nlink"]=&gt;
    int(1)
    ["uid"]=&gt;
    int(501)
    ["gid"]=&gt;
    int(501)
    ["rdev"]=&gt;
    int(0)
    ["size"]=&gt;
    int(473)
    ["atime"]=&gt;
    int(1323573973)
    ["mtime"]=&gt;
    int(1323573973)
    ["ctime"]=&gt;
    int(1323574039)
    ["blksize"]=&gt;
    int(4096)
    ["blocks"]=&gt;
    int(8)
  }
  </code></pre>
  
  <p>I imagine I have done something wrong in the configuration, but haven't quite figured out what it is. </p>
  
  <p>What is even more exciting is that despite file_exists not working <code>fread(fopen('/home/www/public_html/index.html','r'), filesize('/home/www/public_html/index.html'))</code> does return the contents of the file.</p>