#50371 [Fbk->Opn]: realpath() returns path to nonexistent file/folder
| From: | max at kosyakov dot net | Date: | Fri, 04 Dec 2009 07:40:15 +0000 |
| Subject: | #50371 [Fbk->Opn]: realpath() returns path to nonexistent file/folder | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-145397@lists.php.net to get a copy of this message | ||
ID: 50371
User updated by: max at kosyakov dot net
Reported By: max at kosyakov dot net
-Status: Feedback
+Status: Open
Bug Type: Filesystem function related
Operating System: FreeBSD
PHP Version: 5.2.11
New Comment:
%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.
Previous Comments:
------------------------------------------------------------------------
[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"));'
------------------------------------------------------------------------
[2009-12-04 04:44:41] jani@php.net
Must be some FreeBSD thing since I get false with both calls.
------------------------------------------------------------------------
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