From:             pjf at asn dot pl
Operating system: GNU
PHP version:      5.0.5
PHP Bug Type:     *Directory/Filesystem functions
Bug description:  Strange effects of file_exists() etc. caching

Description:
------------
I find caching of file_exists() and similar functions 
causing strange results - as presented by attached code, 
it might cause unexistent files to... "exist" :). 
 

Reproduce code:
---------------
[EMAIL PROTECTED] file_exists]$ ls
file_exists.php
[EMAIL PROTECTED] file_exists]$ cat file_exists.php
<?php

touch("foobar");
echo file_exists("foobar") . "\n";

mkdir("foodir");
echo file_exists("foobar") . "\n";

?>


Expected result:
----------------
[EMAIL PROTECTED] file_exists]$ php file_exists.php 
1 
 
 

Actual result:
--------------
[EMAIL PROTECTED] file_exists]$ php file_exists.php 
1  
1  
  

-- 
Edit bug report at http://bugs.php.net/?id=34589&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=34589&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=34589&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=34589&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=34589&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=34589&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=34589&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=34589&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=34589&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=34589&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=34589&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=34589&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=34589&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=34589&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=34589&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=34589&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=34589&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=34589&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=34589&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=34589&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=34589&r=mysqlcfg

Reply via email to