php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42646 php-cgi.exe doesn't load/use "Per Directory Values" from windows registry
Submitted: 2007-09-12 16:44 UTC Modified: 2007-10-11 13:53 UTC
Votes:6
Avg. Score:4.5 ± 0.5
Reproduced:6 of 6 (100.0%)
Same Version:5 (83.3%)
Same OS:6 (100.0%)
From: simon at bleif dot de Assigned:
Status: Not a bug Package: CGI/CLI related
PHP Version: 5.2.4 OS: Windows Server 2003 R2 x64
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: simon at bleif dot de
New email:
PHP Version: OS:

 

 [2007-09-12 16:44 UTC] simon at bleif dot de
Description:
------------
When running PHP via php-cgi.exe using CGI/FastCGI, "Per Directory Values" are not read from the windows registry.

Reproduce code:
---------------
Simply run PHP in CGI/FastCGI mode using php-cgi.exe and use regmon to monitor the accessed registry keys.

Already configured "Per Directory Values" working correctly via php5isapi.dll are not being loaded and are - as a result - not applied in CGI/FastCGI-mode.
They are applied fine using php5isapi.dll/ISAPI-mode.

Expected result:
----------------
The relevant values should be loaded from the registry and should be applied as described here: http://de3.php.net/manual/en/configuration.changes.php#configuration.changes.windows.

Actual result:
--------------
The relevant registry keys are not loaded from the registry and the settings configured there are not being applied.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-09-13 08:05 UTC] jani@php.net
Just guessing but does the user you run PHP as have permissions to access registry..?
 [2007-09-13 11:09 UTC] simon at bleif dot de
Unfortunately not. Both ISAPI-Worker Process and CGI/FastCGI are running under the same account (Network Service). Regmon shows no tries of php-cgi.exe to access the relevant registry key; there are no "access denied" events logged as it would be the case if the permissions wouldn't have been correctly configured.
 [2007-09-15 10:14 UTC] simon at bleif dot de
With "unfortunately not" I meant that the user has permissions to access the registry, in case someone didn't understood me correctly. Still the same issue here...could you conform that the php-cgi.exe should load and process the settings stored in the registry as the ISAPI module does?
 [2007-09-16 20:06 UTC] simon at bleif dot de
It is definitely not a permissions issue; I ran the 
php.exe and the php-cgi.exe interactively under an 
administrative account, using the filename of a test 
php-file as parameter.

Prerequisites:
- test.php, just containing a call to phpinfo()
- php.ini, open_basedir only set to temp and session directory
- correctly set "per directory values"-registry key, open_basedir set to C:\Inetpub\wwwroot\test for the "test"-folder


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

Result: Displays correct phpinfo-output, the additional setting for open_basedir is reflected here correctly.


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

Result: No input file specified.


Test3:
Configure open_basedir value for the test-folder directly via php.ini, then again:

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

Result: Displays correct phpinfo-output, the additional setting for open_basedir is reflected here correctly.

Interesting: the local value of open_basedir, configured via registry, is displayed in the phpinfo-output!
 [2007-10-11 13:53 UTC] jani@php.net
Duplicate of bug #42815
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 05:01:30 2024 UTC