ID: 44293 User updated by: mmichel at chez dot com Reported By: mmichel at chez dot com -Status: Feedback +Status: Open Bug Type: Filesystem function related Operating System: Win2003 PHP Version: 5.2.5 New Comment:
it returns: string(22) "C:\Inetpub\wwwroot\local" bool(false) Previous Comments: ------------------------------------------------------------------------ [2008-03-03 13:04:43] [EMAIL PROTECTED] What does this script output: <?php $local='./local'; $virt='./elsewhere'; var_dump(realpath($local)); var_dump(realpath($virt)); ?> ------------------------------------------------------------------------ [2008-02-29 15:46:00] mmichel at chez dot com Description: ------------ If you do a realpath('./elsewhere'), where elsewhere is a IIS virtual directory, realpath return FALSE. Reproduce code: --------------- - Use the default site in IIS6 (root=c:\inetpub\wwwroot) - in the root directory create a folder called local - Create a virtual directory (either via a network share or in another path on a local drive, e.g. C:\Elsewhere), and call it elsewhere then <?php $local='./local'; $virt='./elsewhere'; $check_path=realpath($local); print ($checkpath === FALSE) ? "local path not resolved<br>" : "local=$check_path<br>"; $check_path=realpath($virt); print ($checkpath === FALSE) ? "virtual dir not recognized<br>" : "virtual=$check_path<br>"; ?> Expected result: ---------------- local=C:\Inetpub\wwwroot\local virtual=C:\Elsewhere Actual result: -------------- local=C:\Inetpub\wwwroot\local virtual= Note that realpath does not return FALSE... ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=44293&edit=1