ID: 48746 Updated by: paj...@php.net Reported By: ddkees at illinois dot edu -Status: Assigned +Status: Feedback Bug Type: Directory function related Operating System: win32 only - Windows Server 2003 PHP Version: 5.3.0 Assigned To: pajoye New Comment:
Thanks for the testing! :) Added support for mounted volumes (and path resolutions for them). The next snapshots (5.3+) should have it. Previous Comments: ------------------------------------------------------------------------ [2009-08-29 12:21:48] s...@php.net Automatic comment from SVN on behalf of pajoye Revision: http://svn.php.net/viewvc/?view=revision&revision=287877 Log: - Fix #48746, mounted volume support & resolution ------------------------------------------------------------------------ [2009-08-27 19:37:08] phpstuff at cresstone dot com Ok, this snap seems to get everything except mounted volumes for me. test output is now: C:\mnt\test>php phptest.php directory: bool(true) junction.exe junction: bool(true) mklink junction: bool(true) mounted volume: bool(false) I've found 3 ways to create volume junction points on Win 7: Through the mountvol command, thourgh the mklink command, and though the diskmgmt.msc GUI. They all result in the same behavior. I also just found that mklink can create symlinks to volumes, which, alas, also fail. (symlinks to directories & files work fine) 'dir' command for symlinks vs. junctions to volumes looks like this: 2009.08.27 15.18 <SYMLINKD> test2 [\\?\Volume{c7981ed5-d602-11dd-ac24-806e6f6e6963}\] 2009.08.27 15.19 <JUNCTION> test3 [\\?\Volume{c7981ed5-d602-11dd-ac24-806e6f6e6963}\] For the record, the following command sequence can be used to re-create my test setup... c:\mnt & c:\mnt\test are regular directories. C:\mnt\test>mkdir directory C:\mnt\test>junction junction directory Junction v1.05 - Windows junction creator and reparse point viewer Copyright (C) 2000-2007 Mark Russinovich Systems Internals - http://www.sysinternals.com Created: C:\mnt\test\junction Targetted at: C:\mnt\test\directory C:\mnt\test>mklink /j mklink_junction directory Junction created for mklink_junction <<===>> directory C:\mnt\test>mklink /j mounted_volume \\?\Volume{c7981ed5-d602-11dd-ac24-806e6f6e6963}\ Junction created for mounted_volume <<===>> \\?\Volume{c7981ed5-d602-11dd-ac24-806e6f6e6963}\ C:\mnt\test>dir Volume in drive C is coreI7_System Volume Serial Number is 38E2-2B62 Directory of C:\mnt\test 2009.08.27 15.29 <DIR> . 2009.08.27 15.29 <DIR> .. 2009.08.27 15.27 <DIR> directory 2009.08.27 15.27 <JUNCTION> junction [\??\C:\mnt\test\directory] 2009.08.27 15.28 <JUNCTION> mklink_junction [C:\mnt\test\directory] 2009.08.27 15.29 <JUNCTION> mounted_volume [\\?\Volume{c7981ed5-d602-11dd-ac24-806e6f6e6963} \] 2009.08.27 15.23 451 phptest.php 1 File(s) 451 bytes 6 Dir(s) 28,746,731,520 bytes free C:\mnt\test>php phptest.php directory: bool(true) junction.exe junction: bool(true) mklink junction: bool(true) mounted volume: bool(false) Thanks for your work on this, unfortunately, my inability to keep track of drive letters means I use a lot of mounted volumes... ------------------------------------------------------------------------ [2009-08-27 09:50:22] paj...@php.net And confirmed your last cases using Win7/Vista/2k8. In this case junction are prepended with \??\. Fix applied, the next snap should have it. ------------------------------------------------------------------------ [2009-08-27 09:39:02] s...@php.net Automatic comment from SVN on behalf of pajoye Revision: http://svn.php.net/viewvc/?view=revision&revision=287800 Log: - Fix for #48746, fix mounted volume and junctions when used from vista or later, they are actually prepended with \??\ ------------------------------------------------------------------------ [2009-08-27 09:24:03] paj...@php.net To do not miss a case again, can you please tell me how you create each mounted volume or junction? If mnt is a mounted volume or not, etc. Junction created with junction.exe works fine here on xp, 2k3, win7, vista and 2k8, using normal parent directories (mounted volume or not). For example (XP): c:\mnt mounted volume (HDD) c:\mnt\directory (mkdir directory) c:\mnt\junction_abs (created with junction junction c:\mnt\directory) c:\mnt\junction (created with junction junction directory from c:\mnt) Using this script from c:\mnt\test (c:\mnt being a mounted volume): <?php var_dump(file_exists('directory')); var_dump(file_exists('junction_abs')); var_dump(file_exists('junction')); C:\mnt\test>\php-sdk\snap_5_2\vc6\x86\php52\Debug\php.exe t.php bool(true) bool(true) bool(true) ------------------------------------------------------------------------ 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/48746 -- Edit this bug report at http://bugs.php.net/?id=48746&edit=1