From: Operating system: Windows Vista/7 PHP version: Irrelevant Package: Filesystem function related Bug Type: Bug Bug description:PHP realpath on Windows Case Issue
Description: ------------ I have a symlink on my Windows server which was made like this: F:\>mkdir link-target F:\>mklink /D link f:\link-target (Note the lower case f: in the symlink target) In PHP I run this: $dir = realpath('f:\link'); var_dump($dir); $dir = realpath($dir); var_dump($dir); Which outputs: string 'f:\link-target' (length=14) string 'F:\link-target' (length=14) Notice the change in case on the second realpath. The expected output is: string 'F:\link-target' (length=14) string 'F:\link-target' (length=14) Test script: --------------- <?php // F:\>mkdir link-target // F:\>mklink /D link f:\link-target $dir = realpath('f:\link'); var_dump($dir); $dir = realpath($dir); var_dump($dir); Expected result: ---------------- string 'F:\link-target' (length=14) string 'F:\link-target' (length=14) Actual result: -------------- string 'f:\link-target' (length=14) string 'F:\link-target' (length=14) -- Edit bug report at https://bugs.php.net/bug.php?id=61909&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=61909&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=61909&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=61909&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=61909&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=61909&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=61909&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=61909&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=61909&r=needscript Try newer version: https://bugs.php.net/fix.php?id=61909&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=61909&r=support Expected behavior: https://bugs.php.net/fix.php?id=61909&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=61909&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=61909&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=61909&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=61909&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=61909&r=dst IIS Stability: https://bugs.php.net/fix.php?id=61909&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=61909&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=61909&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=61909&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=61909&r=mysqlcfg