#38989 [Opn->Ctl]: Absolute path with slash at beginning doesn't work

From: Date: Wed, 04 Oct 2006 13:18:11 +0000
Subject: #38989 [Opn->Ctl]: Absolute path with slash at beginning doesn't work
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-103081@lists.php.net to get a copy of this message
ID: 38989 Updated by: edink@php.net Reported By: info at xboot dot de -Status: Open +Status: Critical Bug Type: Filesystem function related Operating System: Windows 2003 SP1 PHP Version: 5CVS-2006-09-29 (snap) Previous Comments: ------------------------------------------------------------------------ [2006-09-29 08:33:32] info at xboot dot de PHP runs as ISAPI ------------------------------------------------------------------------ [2006-09-29 07:45:59] info at xboot dot de 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 this bug report at http://bugs.php.net/?id=38989&edit=1

« previous php.bugs (#103081) next »