Bug #77639 [Fbk]: Wrong behavior of getting paths for symlink
| From: | requinix@php.net | Date: | Tue, 19 Feb 2019 18:57:00 +0000 |
| Subject: | Bug #77639 [Fbk]: Wrong behavior of getting paths for symlink | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-219639@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=77639&edit=1
ID: 77639
Updated by: requinix@php.net
Reported by: mesaverde228 at gmail dot com
Summary: Wrong behavior of getting paths for symlink
Status: Feedback
Type: Bug
Package: *Directory/Filesystem functions
Operating System: Windows/Linux
PHP Version: 7.1.26
Block user comment: N
Private report: N
New Comment:
> Is that means that windows "junctions" not supported by PHP?
Depends what "support" you are expecting.
Previous Comments:
------------------------------------------------------------------------
[2019-02-19 18:55:05] requinix@php.net
The only bug I can see here is that realpath() on a junction is resolving it
D:\test\symlinkedcachefolder>php -r
"var_dump(realpath('D:/test/symlinkedcachefolder'));"
string(23) "D:\test\realcachefolder"
when last I knew PHP deliberately did not - only symlinks. Do you agree?
------------------------------------------------------------------------
[2019-02-19 18:53:30] mesaverde228 at gmail dot com
Is that means that windows "junctions" not supported by PHP?
------------------------------------------------------------------------
[2019-02-19 16:55:03] cmb@php.net
Junctions are not symlinks.
------------------------------------------------------------------------
[2019-02-19 11:34:02] mesaverde228 at gmail dot com
Description:
------------
There is some difference in interpretation symlinked folder on different platforms
Test script:
---------------
https://gist.github.com/inri13666/4f7484af32ac7eba81b0d1bf8a5a5111
Expected result:
----------------
I assume that result for
index.php should be almost the same.
Also possibly __DIR__ should point to the symlink(junction) path instead of a physical path.
Actual result:
--------------
https://gist.github.com/inri13666/4f7484af32ac7eba81b0d1bf8a5a5111
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=77639&edit=1