From: simon at bleif dot de Operating system: Windows Server 2003 x64 R2 SP2 PHP version: 5.2.4 PHP Bug Type: Safe Mode/open_basedir Bug description: open_basedir incorrectly parsed when configured via "Per directory values"
Description: ------------ When running PHP via php-cgi.exe using CGI/FastCGI, open_basedir values configured via "Per Directory Values" are not working correctly. ISAPI module and PHP-CLI are not affected, PHP-CGI is. Also see http://bugs.php.net/bug.php?id=42646, reposted here as only open_basedir seems to be affected. Reproduce code: --------------- Prerequisites: - properly set "Per Directory Values"-registry key, open_basedir set to C:\Inetpub\wwwroot\test for the "test"-folder there. - test.php, just containing a call to phpinfo(), located in that "test"-folder - php.ini, open_basedir only set to temp and session directory there, not to the "test"-folder Test1: php.exe -f C:\Inetpub\wwwroot\test\test.php Test2: php-cgi.exe -f C:\Inetpub\wwwroot\test\test.php Test3: Change: Configure php.ini-open_basedir value to include the path to the "test"-folder, then again (exactly as in Test2): php-cgi.exe -f C:\Inetpub\wwwroot\test\test.php Expected result: ---------------- Test1, Test2 and Test3: Each of them should display the correct phpinfo-output, the additional setting for open_basedir (set via "Per Directory Values") should be reflected correctly under "Local Value". Actual result: -------------- Test1: Works as expected Test2: Does not work as expected, "No input file specified" is displayed Test3: Works as expected. Interesting: the local value of open_basedir, configured via registry is displayed in the phpinfo-output under "Local Value"! -- Edit bug report at http://bugs.php.net/?id=42815&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42815&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42815&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42815&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42815&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42815&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42815&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=42815&r=needscript Try newer version: http://bugs.php.net/fix.php?id=42815&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42815&r=support Expected behavior: http://bugs.php.net/fix.php?id=42815&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42815&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42815&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42815&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42815&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42815&r=dst IIS Stability: http://bugs.php.net/fix.php?id=42815&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42815&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42815&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42815&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=42815&r=mysqlcfg