PHP :: Bug #14049 :: Inconsistent return in realpath
| Bug #14049 | Inconsistent return in realpath | ||||
|---|---|---|---|---|---|
| Submitted: | 2001-11-14 04:24 UTC | Modified: | 2003-09-09 20:21 UTC | ||
| From: | g dot noel at symphonieonline dot com | Assigned: | iliaa (profile) | ||
| Status: | Closed | Package: | *Directory/Filesystem functions | ||
| PHP Version: | 4.3.4-dev, 5.0.0b2-dev | OS: | win32 only | ||
| Private report: | No | CVE-ID: | None | ||
[2001-11-14 04:24 UTC] g dot noel at symphonieonline dot com
<?php
echo '['.realpath('./invalid/dir/or/file/name).']';
?>
On Windows : [c:\www\invalid\dir\or\file\name]
On Linux : []
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2002-06-04 16:21 UTC] mfischer@php.net
[2003-08-20 19:10 UTC] sniper@php.net
[2003-08-20 19:11 UTC] brandon dot whitehead at orst dot edu
I get the following output when run on Linux and Windows, both running 4.3.2. I ran this test with the command line interface. <?php echo '['.realpath('./invalid/dir/or/file/name').']'; ?> The results: On Windows : [d:\http\invalid\dir\or\file\name] On Linux : [] The function should return false if the file is not a valid file (according to the documentation). It does not do this in Windows. I am not making this up. The problem still exists, on both Windows 2000 Pro and Windows XP Pro. Though possible, I doubt this is a configuration issue.[2003-09-09 20:21 UTC] iliaa@php.net