#41735 [Fbk]: file_exists reports incorrect results
| From: | stas@php.net | Date: | Tue, 26 Jun 2007 22:55:26 +0000 |
| Subject: | #41735 [Fbk]: file_exists reports incorrect results | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-114297@lists.php.net to get a copy of this message | ||
ID: 41735
Updated by: stas@php.net
Reported By: php-bug at okra dot org
Status: Feedback
Bug Type: Filesystem function related
Operating System: Windows Server 2003
PHP Version: 5.2.3
New Comment:
It would be useful to know permissions on all involved directories and
also the user under which the test was done.
Previous Comments:
------------------------------------------------------------------------
[2007-06-26 12:17:49] tony2001@php.net
Not reproducible.
------------------------------------------------------------------------
[2007-06-26 08:01:31] php-bug at okra dot org
No change with the snapshot (5.2.4-dev).
FYI, this bug also exists in PHP 4.4.7 and 4.4.6. I'm not sure about
earlier versions of PHP 4.
As mentioned in the original bug report, it did NOT exist in PHP 5.2.1.
------------------------------------------------------------------------
[2007-06-25 18:03:40] tony2001@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows (zip):
http://snaps.php.net/win32/php5.2-win32-latest.zip
For Windows (installer):
http://snaps.php.net/win32/php5.2-win32-installer-latest.msi
------------------------------------------------------------------------
[2007-06-19 01:47:32] php-bug at okra dot org
Correction: The "Expected result" below is from PHP 5.2.1.
------------------------------------------------------------------------
[2007-06-19 01:45:53] php-bug at okra dot org
Description:
------------
file_exists() returns strange results in PHP 5.2.3. This worked fine in
5.2.1. The "Actual result" below is from PHP 5.2.1 on the same server.
Reproduce code:
---------------
<?php
header('Content-type: text/plain');
foreach (array('d:/home', 'd:/home/domain.com',
'd:/home/domain.com/phpinfo.php', 'c:/WINDOWS', 'c:/WINDOWS/system32',
'c:/bogus') as $file) {
echo "$file: " . (file_exists($file) ? 'yes' : 'no' ) .
"\n";
}
?>
Expected result:
----------------
d:/home: yes
d:/home/domain.com: yes
d:/home/domain.com/phpinfo.php: yes
c:/WINDOWS: yes
c:/WINDOWS/system32: yes
c:/bogus: no
Actual result:
--------------
d:/home: yes
d:/home/domain.com: no
d:/home/domain.com/phpinfo.php: yes
c:/WINDOWS: no
c:/WINDOWS/system32: yes
c:/bogus: no
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41735&edit=1