From: danfratus at attbi dot com
Operating system: Windows XP Professional
PHP version: 4.3.2
PHP Bug Type: Filesystem function related
Bug description: file_exists generates false error
<?
if (file_exists("$file") && $file != "." && $file != "..")
{
$file = join('',file($file));
echo "$file";
}
?>
Ok the glitch is this: if $file is "." or ".." the script is fine, no
errors are generated, but, when $file is "..." or "......." or
"..................", etc. then for some reason PHP reconizes this as a
directory, yet it can't be included therefore generating this error:
---
Warning: file(...) [function.file]: failed to create stream: No such file
or directory in F:\server\bug.php on line 4
Warning: join() [function.join]: Bad arguments. in F:\server\bug.php on
line 4
---
This "bug" isn't going to crash the entire internet or anything, but it
should be fixed.
--
Edit bug report at http://bugs.php.net/?id=24086&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=24086&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=24086&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=24086&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=24086&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=24086&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=24086&r=support
Expected behavior: http://bugs.php.net/fix.php?id=24086&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=24086&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=24086&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=24086&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24086&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=24086&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=24086&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=24086&r=gnused