|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42815 open_basedir incorrectly parsed when configured via "Per directory values"
Submitted: 2007-10-01 14:12 UTC Modified: 2008-05-26 01:00 UTC
Avg. Score:4.3 ± 0.9
Reproduced:3 of 3 (100.0%)
Same Version:2 (66.7%)
Same OS:2 (66.7%)
From: simon at bleif dot de Assigned:
Status: No Feedback Package: Safe Mode/open_basedir
PHP Version: 5.2.6 OS: Windows Server 2003 x64 R2 SP2
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2007-10-01 14:12 UTC] simon at bleif dot de
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, reposted here as only open_basedir seems to be affected.

Reproduce code:
- 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

php.exe -f C:\Inetpub\wwwroot\test\test.php

php-cgi.exe -f C:\Inetpub\wwwroot\test\test.php

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:
Works as expected

Does not work as expected, "No input file specified" is displayed

Works as expected.
Interesting: the local value of open_basedir, configured via registry is displayed in the phpinfo-output under "Local Value"!


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-02 12:21 UTC]
What's the difference between this report and bug #42646?
Isn't this the same issue?
 [2007-10-03 16:38 UTC] simon at bleif dot de
I filed the bug #42646 in the assumption that all "per directory"-assignments don't work - as only open_basedir seems affected, I decided to file a new bug report in the appropriate category (here).
 [2008-03-26 13:00 UTC]
Please try using this CVS snapshot:
For Windows (zip):

For Windows (installer):

This is most likely fixed now.
 [2008-05-14 00:13 UTC] simon at bleif dot de
Unfortunately the bug still exists in 5.2.6 (I waited for the official release to test it directly in a productive environment.) - any additional fixing would be greatly appreciated.

Please contact me in case you need further information.
 [2008-05-18 00:35 UTC]
AFAIK, this is not actually supported under CLI/CGI, if I guessed right how it works. (It's only supported by ISAPI) Or do you claim this has worked in some previouus PHP version..?
 [2008-05-26 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Mar 03 03:01:28 2024 UTC