Bug #76460 [NEW]: Windows absolute symbolic links created without drive letter.

From: Date: Tue, 12 Jun 2018 02:29:05 +0000
Subject: Bug #76460 [NEW]: Windows absolute symbolic links created without drive letter.
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-215631@lists.php.net to get a copy of this message
From: php dot net at sameprecision dot org Operating system: Windows Server 2016 PHP version: 7.2.6 Package: *General Issues Bug Type: Bug Bug description:Windows absolute symbolic links created without drive letter. Description: ------------ Absolute symbolic links for local drives created in a standard cmd shell without drive letter using mklink are not followed in PHP. For instance, in cmd, "mklink /d c:\tmp\windows \windows" creates a symbolic link (directory) to c:\windows. In PHP, is_dir('c:/tmp/windows') returns false. is_link('c:/tmp/windows') returns true. readlink('c:/tmp/windows') returns "c:/windows". is_dir('/windows') returns true. If the link is created with the drive letter, is_dir/is_file returns true. This seems like an inconsistency given that is_file/is_dir recognize absolute paths to files/directories that do not include the drive letter. Test script: --------------- Windows cmd shell without drive letter: mkdir c:\tmp mklink /d c:\tmp\windows \windows PHP interactive CLI (php -a): is_dir('c:/tmp/windows') == true //false is_dir('/windows') == true //true readlink('c:/tmp/windows') == 'c:\windows' //true Windows cmd shell with drive letter: mkdir c:\tmp mklink /d c:\tmp\windows c:\windows PHP interactive CLI (php -a): is_dir('c:/tmp/windows') == true //true is_dir('/windows') == true //true readlink('c:/tmp/windows') == 'c:\windows' //true -- Edit bug report at https://bugs.php.net/bug.php?id=76460&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76460&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76460&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76460&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=76460&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=76460&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=76460&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=76460&r=needscript Try newer version: https://bugs.php.net/fix.php?id=76460&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=76460&r=support Expected behavior: https://bugs.php.net/fix.php?id=76460&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=76460&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=76460&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=76460&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76460&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=76460&r=dst IIS Stability: https://bugs.php.net/fix.php?id=76460&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=76460&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=76460&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=76460&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=76460&r=mysqlcfg

« previous php.bugs (#215631) next »