From:             dlafond at lenouvelliste dot qc dot ca
Operating system: os X Server 10.5.6/Apache 2.2.9
PHP version:      5.2.9
PHP Bug Type:     *Directory/Filesystem functions
Bug description:  File_exists and clearstatcache not working on network volume

Description:
------------
When files are saved on AFP or SMB mounted sharing, file_exists() and 
clearstatcache() function are not working as expected. No problem when 
files are saved on local disk. On AFP or SMB volume, file_exists 
continue to return true when the file is deleted outside of PHP. 
clearstatcache() function seems to have no effect.

But, if the file is deleted with the unlink() function in php, 
file_exists return false.







Reproduce code:
---------------
<?
header("Content-type: text/html");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-store, no-cache,must-revalidate");
header("Cache-Control: post-check=0, pre-check=0",false);
header("Pragma: no-cache");


clearstatcache();

$ttt="/Volumes/testdaniel/ttt.txt";
#exec("touch ".$ttt);
#...@unlink($ttt);

if(file_exists($ttt)){
   echo "exists";
}else{
   echo "not exists";
}
clearstatcache();

?>

Expected result:
----------------
"exists" when file really exists
"not exists" when file doesn't exists

Actual result:
--------------
"exists" even after the file was deleted

-- 
Edit bug report at http://bugs.php.net/?id=48062&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        
http://bugs.php.net/fix.php?id=48062&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        
http://bugs.php.net/fix.php?id=48062&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        
http://bugs.php.net/fix.php?id=48062&r=trysnapshot60
Fixed in CVS:                        
http://bugs.php.net/fix.php?id=48062&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=48062&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=48062&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=48062&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=48062&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=48062&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=48062&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=48062&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=48062&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=48062&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=48062&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=48062&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=48062&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=48062&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=48062&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=48062&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=48062&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=48062&r=mysqlcfg

Reply via email to