From: info at xboot dot de Operating system: Windows 2003 SP1 PHP version: 5CVS-2006-09-29 (snap) PHP Bug Type: Filesystem function related Bug description: Absolute path with slash at beginning doesn't work
Description: ------------ System: Win 2003 SP1 IIS 6 PHP 5.2.0RC5-dev (29.09.2006) File operations with slash at the beginning (absolute path) don't work. It doesn't matter which kind of function i use. include(), fopen(), SPL-functions, ... don't work if i pass a filename with a slash at the beginning. If i add the drive letter it works correct. The same script works fine with PHP 5.1.2. Reproduce code: --------------- <?php echo $_SERVER['PHP_SELF'] . '<br />'; $handle = fopen($_SERVER['PHP_SELF'], "r"); // this is the same file, but it works: // $handle = fopen("D:\Intranet\path.php", "r"); echo $handle; ?> Expected result: ---------------- Result with PHP 5.1.2: /intranet/path.php Resource id #2 Actual result: -------------- Result with PHP Version 5.2.0RC5-dev (29.09.2006): /intranet/path.php Warning: fopen(/intranet/path.php) [function.fopen]: failed to open stream: No such file or directory in D:\Intranet\path.php on line 5 -- Edit bug report at http://bugs.php.net/?id=38989&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38989&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38989&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38989&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=38989&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=38989&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=38989&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=38989&r=needscript Try newer version: http://bugs.php.net/fix.php?id=38989&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=38989&r=support Expected behavior: http://bugs.php.net/fix.php?id=38989&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=38989&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=38989&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=38989&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38989&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=38989&r=dst IIS Stability: http://bugs.php.net/fix.php?id=38989&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=38989&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=38989&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=38989&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=38989&r=mysqlcfg