| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2010-01-26 07:29 UTC] jani@php.net
  [2010-01-27 01:56 UTC] pajoye@php.net
  [2010-01-27 03:30 UTC] paul dot sanchez at basicdays dot com
  [2010-02-04 01:00 UTC] php-bugs at lists dot php dot net
  [2010-04-25 20:24 UTC] felipe@php.net
 
-Status: No Feedback
+Status: Feedback
  [2010-04-25 20:24 UTC] felipe@php.net
  [2013-02-18 00:34 UTC] php-bugs at lists dot php dot net
  | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 10:00:02 2025 UTC | 
Description: ------------ - Using the VC9 x86 Non Thread Safe 5.3.1 version and the 5.3.2RC1 version from windows.php.net - IIS7 using fast cgi - Script works when under C:\inetpub\wwwroot - Script gives warning when it is running under a virtual directory or application - Problem does not exist when open_basedir is not set - Following are some php.ini settings from development ini file - cgi.force_redirect = 0 - cgi.fix_pathinfo = 1 - fastcgi.impersonate = 1 - fastcgi.logging = 0 Reproduce code: --------------- <?php $root = dirname(__FILE__); echo $root; echo 'phpinfo.php: ' . file_exists('test.php') . '<br>'; echo 'junk.php: ' . file_exists('junk.php') . '<br><br>'; echo 'phpinfo.php: ' . file_exists("$root/test.php") . '<br>'; echo 'junk.php: ' . file_exists("$root/junk.php") . '<br><br>'; ?> Expected result: ---------------- C:\Users\myname\WIP\myproject test.php: 1 junk.php: test.php: 1 junk.php: Actual result: -------------- C:\Users\myname\WIP\myproject test.php: 1 Warning: file_exists() [function.file-exists.php]: open_basedir restriction in effect. File(junk.php) is not within the allowed path(s): (C:\inetpub\wwwroot;C:\Users\myname\WIP) in C:\Users\myname\WIP\myproject\test.php on line 5 junk.php: test.php: 1 Warning: file_exists() [function.file-exists.php]: open_basedir restriction in effect. File(C:\Users\myname\WIP\myproject/junk.php) is not within the allowed path(s): (C:\inetpub\wwwroot;C:\Users\myname\WIP) in C:\Users\myname\WIP\myproject\test.php on line 8 junk.php: