It seems stat cache is broken. I've tried 4.0.4pl1 and 4.3.0-dev, functions that should use stat cache do no use cache, but it just call stat or access as requested.
<?php $filename = 'test_file'; // make sure file does not exist unlink($filename); var_dump(is_readable($filename)); // create file touch($filename); chmod($filename, 0); var_dump(is_readable($filename)); // remove file unlink($filename); // chmod does not make difference var_dump(is_readable($filename)); // This should use stat cache return TRUE, isn't? // clear cache and test again clearstatcache($filename); var_dump(is_readable($filename)); ?> we have 2 choices. 1) Fix stat cache 2) Change documentation http://jp.php.net/manual/en/function.clearstatcache.php Fixing this will break many scripts, probably. Just point it out the problem I noticed, since Wez is going to rewrite stat related code soon(?) IIRC. -- Yasuo Ohgaki -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php