|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-12-04 16:00 UTC] amccardie at cox dot net
[2007-12-05 11:03 UTC] jani@php.net
[2007-12-05 15:25 UTC] amccardie at cox dot net
[2008-01-29 14:25 UTC] dmitry@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 08:00:02 2025 UTC |
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