Edit report at https://bugs.php.net/bug.php?id=61441&edit=1
ID: 61441 User updated by: daveespionage at gmail dot com Reported by: daveespionage at gmail dot com Summary: readlink returns operating system specific directory separators in result Status: Open Type: Bug Package: Filesystem function related Operating System: Windows 7 64 bit PHP Version: 5.3.10 Block user comment: N Private report: N New Comment: I should have clarified in the description, $_SERVER['DOCUMENT_ROOT'] in this case is pointed to a directory symlink created with 'mklink /D', that has the alias 'c:\sites\project' and resolves to 'c:\work\Project\wwwroot' Previous Comments: ------------------------------------------------------------------------ [2012-03-19 18:57:57] daveespionage at gmail dot com Description: ------------ readlink when called on a directory symlink in Windows 7 returns directory separators of '\', whereas seemingly most other filesystem functions return directory separators of '/' regardless of host operating system. Test script: --------------- <?php echo 'Docroot: ' . $_SERVER['DOCUMENT_ROOT'] . '<br />'; echo 'Readlink: ' . readlink($_SERVER['DOCUMENT_ROOT']) . '<br />'; ?> Expected result: ---------------- Docroot: C:/sites/project Readlink: C:/work/Project/wwwroot Actual result: -------------- Docroot: C:/sites/project Readlink: C:\work\Project\wwwroot ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=61441&edit=1