#50371 [Opn->Bgs]: realpath() returns path to nonexistent file/folder
| From: | jani@php.net | Date: | Fri, 04 Dec 2009 08:21:04 +0000 |
| Subject: | #50371 [Opn->Bgs]: realpath() returns path to nonexistent file/folder | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-145399@lists.php.net to get a copy of this message | ||
ID: 50371
Updated by: jani@php.net
Reported By: max at kosyakov dot net
-Status: Open
+Status: Bogus
Bug Type: Filesystem function related
Operating System: FreeBSD
PHP Version: 5.2.11
New Comment:
No way to fix in 5.2, the future is 5.3 anyway.
Previous Comments:
------------------------------------------------------------------------
[2009-12-04 07:40:15] max at kosyakov dot net
%ls -l /usr/home/kosyakov/asdfasdf
ls: /usr/home/kosyakov/asdfasdf: No such file or directory
Ok. I'll try to update to 5.3. But is there a way to get it fixed in
the 5.2 branch? I need to maintain compatibility of software we develop
with php-5.2 and thus need to run this version on our servers.
Thanks for your assistance.
------------------------------------------------------------------------
[2009-12-04 07:32:49] jani@php.net
Also, did you notice this note on the manual page
http://php.net/realpath
"5.3.0 Prior to this release realpath() would not fail on *BSD
systems if only the last last path component did not exist. "
------------------------------------------------------------------------
[2009-12-04 07:31:00] jani@php.net
And what does this output:
# ls -l /usr/home/kosyakov/asdfasdf
------------------------------------------------------------------------
[2009-12-04 07:27:12] max at kosyakov dot net
Yes, it does return false:
FreeBSD 6.1-RELEASE (GENERIC) #0: Sun May 7 04:32:43 UTC 2006
%php -r "var_dump(realpath('/non/existent'));"
bool(false)
%
------------------------------------------------------------------------
[2009-12-04 04:45:52] jani@php.net
What does this return:
# php -r 'var_dump(realpath("/non/existent"));'
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/50371
--
Edit this bug report at http://bugs.php.net/?id=50371&edit=1