#41480 [Asn->Fbk]: realpath returns false on valid path without filename
| From: | dmitry@php.net | Date: | Thu, 14 Jun 2007 10:26:18 +0000 |
| Subject: | #41480 [Asn->Fbk]: realpath returns false on valid path without filename | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-113775@lists.php.net to get a copy of this message | ||
ID: 41480
Updated by: dmitry@php.net
Reported By: derek dot ethier at gmail dot com
-Status: Assigned
+Status: Feedback
Bug Type: IIS related
Operating System: Windows Server 2003
PHP Version: 5.2.2
Assigned To: dmitry
New Comment:
I am not able to reprodce this problem with CVS version.
Previous Comments:
------------------------------------------------------------------------
[2007-06-01 16:48:10] derek dot ethier at gmail dot com
(This problem is still present in 5.2.3)
I don't think that this is the expected result for this function call
as the posted expected result is returned with both the CGI module and
with Apache2 on the same server. Only the ISAPI module returns the
boolean false on a valid path without filename.
------------------------------------------------------------------------
[2007-05-26 04:29:40] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
The current behavior is the expected one.
------------------------------------------------------------------------
[2007-05-24 02:13:56] derek dot ethier at gmail dot com
Description:
------------
In PHP < 5.2.2 the realpath function would return a string value on a
valid path passed to the function. In 5.2.2 it returns false unless a
filename is specified.
Going over the documentation it looks like this might be an expected
result, but it is different from earlier versions.
Extensions: curl, ldap, mssql, mysql, pdo, pdo_sqlite, pdo_mssql,
sqlite, tidy, ssh2
I'm using the php.ini file from my 5.2.1 installation and going over
the incompatibilities and changes from 5.2.1 the only change that seems
related is this one:
- SplFileObject::getFilename() returns the filename, not
relative/path/to/file, as of PHP 5.2.1.
Reproduce code:
---------------
$path1 = 'E:\\webroot\\';
$path2 = 'E:\\webroot\\index.php';
var_dump(realpath($path1));
var_dump(realpath($path2));
Expected result:
----------------
string 'E:\webroot\' (length=11)
string 'E:\webroot\index.php' (length=20)
Actual result:
--------------
boolean false
string 'E:\webroot\index.php' (length=20)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41480&edit=1