ID: 50163 User updated by: be3ch at centrum dot cz Reported By: be3ch at centrum dot cz Status: Bogus Bug Type: Filesystem function related Operating System: Windows 2003 Server PHP Version: 5.2.11 Assigned To: pajoye New Comment:
Sorry, PHP 5.3.0 VC9 x86 Non Thread Safe - same problem. Non-TS version of PHP not working correctly when on webroot directory are only READ NTFS permissions. It's working only with READ+EXECUTE. Previous Comments: ------------------------------------------------------------------------ [2009-11-13 11:00:44] paj...@php.net Simply try it with 5.3. impersonate and ACL has been improved/fixed there. ------------------------------------------------------------------------ [2009-11-13 10:57:37] be3ch at centrum dot cz I'm think it's not problem with ACL, because with PHP 5.2.11 ts-version it works correctly and if script will be changed to FULL path : <?php var_dump(file_exists('D:\wwwroot\testcom\www\test.php')); ?> it works with PHP 5.2.11 non-ts and only READ permissions correctly too. ------------------------------------------------------------------------ [2009-11-13 10:36:26] paj...@php.net 5.2 did not support ACL correctly, 5.3 does. ------------------------------------------------------------------------ [2009-11-13 09:23:01] be3ch at centrum dot cz Description: ------------ Hello, I have installed PHP 5.2.11 on Windows 2003 Server, IIS6 and FastCGI handler. For this configuration is recommended usage of non-ts version of PHP. I'm encountered a problem with this version. If I'm using PHP 5.2.11 ts and for IUSR are on webroot directory only READ permissions, all works correctly. If I'm using PHP 5.2.11 non-ts and for IUSR are on webroot directory only READ permissions, files functions don't work. But functions like include or require work correctly. If I'm using PHP 5.2.11 non-ts and for IUSR are on webroot directory READ+EXECUTE permissions, all works correctly. There are some my test results : Web=test.com RootPath=D:\wwwroot\testcom\www\ TestScript=http://test.com/test.php IUSR=IUSR_testcom 1) IUSR_testcom NTFS permissions on RootPath : READ (OK) PHP 5.2.11 ts - test script result: bool(true) (KO) PHP 5.2.11 non-ts - test script result: Warning: file_exists(): open_basedir restriction in effect. File(test.php) is not within the allowed path(s): (D:\wwwroot\testcom;D:\tmp\System;D:\tmp\Php) in D:\wwwroot\testcom\www\test.php on line 3 bool(false) 2) IUSR_testcom NTFS permissions on RootPath : READ + EXECUTE (OK) PHP 5.2.11 ts - test script result: bool(true) (OK) PHP 5.2.11 non-ts - test script result: bool(true) Why PHP non-ts not working correctly when on root path are only READ permissions for IUSR? FastCGI and PHP are running with impersonate. Reproduce code: --------------- Test script test.php source code: <?php var_dump(file_exists('test.php')); ?> Expected result: ---------------- bool(true) Actual result: -------------- Warning: file_exists(): open_basedir restriction in effect. File(test.php) is not within the allowed path(s): (D:\wwwroot\testcom;D:\tmp\System;D:\tmp\Php) in D:\wwwroot\testcom\www\test.php on line 3 bool(false) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=50163&edit=1