#43491 [Opn->Fbk]: Under certain conditions, file_exists() never returns

From: Date: Tue, 04 Dec 2007 12:29:24 +0000
Subject: #43491 [Opn->Fbk]: Under certain conditions, file_exists() never returns
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-120357@lists.php.net to get a copy of this message
ID: 43491 Updated by: jani@php.net Reported By: amccardie at cox dot net -Status: Open +Status: Feedback Bug Type: Filesystem function related Operating System: Windows 2003 SP2 PHP Version: 5.2.5 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi Previous Comments: ------------------------------------------------------------------------ [2007-12-04 00:19:33] amccardie at cox dot net Description: ------------ When open_basedir is set in php.ini, file_exists() will never return if called with an argument containing a ":/" or ":\\" without a corresponding drive letter. Example: file_exists("C:/foo.txt") => works file_exists("C:\\foo.txt") => works file_exists(":/foo.txt") never returns. file_exists(":\\foo.txt") never returns. Tested under Windows 2003 Server with SP2 and Windows XP Pro, both using Apache 2.2.6/mod_php. Reproduce code: --------------- copy php.ini-dist to php.ini set open_basedir = C:/ <?php //Should print "no" print file_exists("C:/foo.txt")?"yes\n":"no\n"; //Should also print "no" but never returns, //causing high CPU, if open_basedir is set print file_exists(":/foo.txt")?"yes\n":"no\n"; exit; ?> Expected result: ---------------- no no Actual result: -------------- no file_exists() call never returns ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43491&edit=1

« previous php.bugs (#120357) next »