#42815 [NoF-Opn]: open_basedir incorrectly parsed when configured via Per directory values

2008-05-13 Thread simon at bleif dot de
 ID:   42815
 User updated by:  simon at bleif dot de
 Reported By:  simon at bleif dot de
-Status:   No Feedback
+Status:   Open
 Bug Type: Safe Mode/open_basedir
 Operating System: Windows Server 2003 x64 R2 SP2
-PHP Version:  5.2.4
+PHP Version:  5.2.6
 Assigned To:  fb-req-jani
 New Comment:

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.


Previous Comments:


[2008-04-03 01:00:01] 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.



[2008-03-26 13:00:16] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi

This is most likely fixed now.



[2007-10-03 16:38:56] 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).



[2007-10-02 12:21:45] [EMAIL PROTECTED]

What's the difference between this report and bug #42646?
Isn't this the same issue?



[2007-10-01 14:12:02] simon at bleif dot de

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 this bug report at http://bugs.php.net/?id=42815edit=1



#42815 [Fbk-Opn]: open_basedir incorrectly parsed when configured via Per directory values

2007-10-03 Thread simon at bleif dot de
 ID:   42815
 User updated by:  simon at bleif dot de
 Reported By:  simon at bleif dot de
-Status:   Feedback
+Status:   Open
 Bug Type: Safe Mode/open_basedir
 Operating System: Windows Server 2003 x64 R2 SP2
 PHP Version:  5.2.4
 New Comment:

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).


Previous Comments:


[2007-10-02 12:21:45] [EMAIL PROTECTED]

What's the difference between this report and bug #42646?
Isn't this the same issue?



[2007-10-01 14:12:02] simon at bleif dot de

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 this bug report at http://bugs.php.net/?id=42815edit=1


#42815 [NEW]: open_basedir incorrectly parsed when configured via Per directory values

2007-10-01 Thread simon at bleif dot de
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=42815edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=42815r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=42815r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=42815r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=42815r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=42815r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=42815r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=42815r=needscript
Try newer version:http://bugs.php.net/fix.php?id=42815r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=42815r=support
Expected behavior:http://bugs.php.net/fix.php?id=42815r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=42815r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=42815r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=42815r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=42815r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=42815r=dst
IIS Stability:http://bugs.php.net/fix.php?id=42815r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=42815r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=42815r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=42815r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=42815r=mysqlcfg


#42646 [Opn]: php-cgi.exe doesn't load/use Per Directory Values from windows registry

2007-09-16 Thread simon at bleif dot de
 ID:   42646
 User updated by:  simon at bleif dot de
 Reported By:  simon at bleif dot de
 Status:   Open
 Bug Type: CGI related
 Operating System: Windows Server 2003 R2 x64
 PHP Version:  5.2.4
 New Comment:

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!


Previous Comments:


[2007-09-15 10:14:56] 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-13 11:09:54] 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-13 08:05:14] [EMAIL PROTECTED]

Just guessing but does the user you run PHP as have permissions to
access registry..?



[2007-09-12 16:44:16] 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.





-- 
Edit this bug report at http://bugs.php.net/?id=42646edit=1


#42646 [Opn]: php-cgi.exe doesn't load/use Per Directory Values from windows registry

2007-09-15 Thread simon at bleif dot de
 ID:   42646
 User updated by:  simon at bleif dot de
 Reported By:  simon at bleif dot de
 Status:   Open
 Bug Type: CGI related
 Operating System: Windows Server 2003 R2 x64
 PHP Version:  5.2.4
 New Comment:

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?


Previous Comments:


[2007-09-13 11:09:54] 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-13 08:05:14] [EMAIL PROTECTED]

Just guessing but does the user you run PHP as have permissions to
access registry..?



[2007-09-12 16:44:16] 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.





-- 
Edit this bug report at http://bugs.php.net/?id=42646edit=1


#42646 [Fbk-Opn]: php-cgi.exe doesn't load/use Per Directory Values from windows registry

2007-09-13 Thread simon at bleif dot de
 ID:   42646
 User updated by:  simon at bleif dot de
 Reported By:  simon at bleif dot de
-Status:   Feedback
+Status:   Open
 Bug Type: CGI related
 Operating System: Windows Server 2003 R2 x64
 PHP Version:  5.2.4
 New Comment:

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.


Previous Comments:


[2007-09-13 08:05:14] [EMAIL PROTECTED]

Just guessing but does the user you run PHP as have permissions to
access registry..?



[2007-09-12 16:44:16] 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.





-- 
Edit this bug report at http://bugs.php.net/?id=42646edit=1


#42646 [NEW]: php-cgi.exe doesn't load/use Per Directory Values from windows registry

2007-09-12 Thread simon at bleif dot de
From: simon at bleif dot de
Operating system: Windows Server 2003 R2 x64
PHP version:  5.2.4
PHP Bug Type: *Configuration Issues
Bug description:  php-cgi.exe doesn't load/use Per Directory Values from 
windows registry

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.

-- 
Edit bug report at http://bugs.php.net/?id=42646edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=42646r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=42646r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=42646r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=42646r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=42646r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=42646r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=42646r=needscript
Try newer version:http://bugs.php.net/fix.php?id=42646r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=42646r=support
Expected behavior:http://bugs.php.net/fix.php?id=42646r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=42646r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=42646r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=42646r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=42646r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=42646r=dst
IIS Stability:http://bugs.php.net/fix.php?id=42646r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=42646r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=42646r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=42646r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=42646r=mysqlcfg


#41233 [Fbk-Opn]: Per Directory Values are not applied correctly

2007-04-30 Thread simon at bleif dot de
 ID:   41233
 User updated by:  simon at bleif dot de
 Reported By:  simon at bleif dot de
-Status:   Feedback
+Status:   Open
 Bug Type: IIS related
 Operating System: Windows Server 2003 x64 R2 SP2
 PHP Version:  5.2.1
 New Comment:

Thank you for your reply.

Unfortunately, things are now broken completely in that snapshot -
although all values are being read from the registry, none of them are
being applied (not even in .php-files located in the first folder).


Previous Comments:


[2007-04-30 13:22:52] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip





[2007-04-30 02:50:33] simon at bleif dot de

Description:

According to
http://www.php-center.de/en-html-manual/configuration.changes.html, you
are able to change parts of the PHP-configuration on a
per-directory-manner.
After setting the desired configuration options there and restarting
IIS, only the options for the first folder (if there are some
folders/registry keys within the same folder/key each configured
with individual options) are applied.
A trace with Regmon shows the W3WP enumerating and (successfully)
accessing all entries under the Per Directory Values-hive.

Reproduce code:
---
Setup at least 2 virtul hosts (located under C:\Inetpub\wwwroot\a and
C:\Inetpub\wwwroot\b).
Start Regedit, navigate to the key HKLM\Software\PHP
(HKLM\Software\Wow6432Node\PHP if you are on x64), create the subkey
Per Directory Values. This key gets a new subkey named c, that key
gets one named Inetpub, that one gets a subkey named wwwroot.
Now you create two keys (one named a, the other one named b)
directly below the key wwwroot.
Now, create a new string value called for example log_errors in both
of these keys and set that value to the opposite of the value defined in
the php.ini (for example 0).
Restart IIS, place a file named test.php in both physical virtual host
directory containing the following:
?php
echo 'log_errors = ' . ini_get('log_errors');
echo 'log_errors2 = ' . get_cfg_var('log_errors');
?

If you now launch your web browser, point it to virtual host A, the
correct values (as they were set in the registry) are being displayed.
If you do the same with host B, the default values (as set in the
php.ini or a registry key above the virtual host B configuration-key)
(or NULL) are beeing displayed, not the setting defined in the
registry.

If you now delete the key a in the registry and restart IIS, the
correct value is displayed when you point your browser to virtual host
B. If you create a third virtual host C (folder: c), the settings stored
in the registry are applied only if there are no other hosts-settings
defined before (in alphabetical order, starting with a) that host in the
same registry-key.

The same issue also appears on a second server (same OS, same versions,
but different php.ini).
The issue applies both in safe- and non-safe mode.

Expected result:

The settings are being applied correctly on a per folder-level.

Actual result:
--
The settings are only applied to the first (in alphabetical order)
configured folder in a directory. Further details please see under
Reproduce code.





-- 
Edit this bug report at http://bugs.php.net/?id=41233edit=1


#41192 [Com]: Per Directory Values only work for one key

2007-04-30 Thread simon at bleif dot de
 ID:   41192
 Comment by:   simon at bleif dot de
 Reported By:  martin at itmission dot com
 Status:   Assigned
 Bug Type: PHP options/info functions
 Operating System: Windows Server 2003
 PHP Version:  5.2.1
 Assigned To:  dmitry
 New Comment:

Can be reproduced in Windows Server 2003 x64 R2. Filed a bugreport
regarding the same issue (see http://bugs.php.net/bug.php?id=41233).

I have to add that all entries are being read from the registry
correctly (result: success in Regmon), but are not (as he already said)
applied.


Previous Comments:


[2007-04-26 11:32:16] martin at itmission dot com

I downloaded the newest Win32 Snapshot from snaps.php.net:

php5.2 (zip) (9.5M)
Built On: Apr 26, 2007 08:30 GMT

In this version of PHP (5.2.2RC2-dev), Per Directory Values do not work
at all.  My phpinfo page shows display errors: off for both sites.

When I roll back to PHP-5.2.1, it works for the first website in the
registry, and with PHP-5.2.0, it works for both of them.



[2007-04-26 11:05:39] [EMAIL PROTECTED]

The bug should be already fixed. Could you check snapshot from
http://snaps.php.net



[2007-04-26 03:09:02] martin at itmission dot com

I am assuming that it has something to do with the massive change to
registry.c between 5.2.0 and 5.2.1 changelogged as implemented registry
cache that prevent registry lookup on each request. In case of
modification of corresponding registry-tree PHP will reload it
automatic.

Perhaps something in the way it's being cached is not working properly.
 The simpler code of 5.2.0 works as expected (and it hits the registry
with every request, but I can live with that).



[2007-04-26 02:13:08] martin at itmission dot com

Possibly noteworthy, the exact same configuration works fine in PHP
5.2.0.



[2007-04-26 01:41:12] martin at itmission dot com

I understand that I was wrong to try to make it work with
auto_prepend_file.

When I remove auto_prepend_file and specify only display_errors = on
(PHP_INI_ALL), and change my scripts to ?php phpinfo(); ?, www1 shows
Display Errors: On, and www2 shows Display Errors: off.  Deleting www1
or renaming it to www3 causes www2 to show Display Errors: on.

When I create a fake error, like trying to open a nonexistent file,
www1 displays the error, while www2 does not.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/41192

-- 
Edit this bug report at http://bugs.php.net/?id=41192edit=1


#41233 [NEW]: Per Directory Values are not applied correctly

2007-04-29 Thread simon at bleif dot de
From: simon at bleif dot de
Operating system: Windows Server 2003 x64 R2 SP2
PHP version:  5.2.1
PHP Bug Type: IIS related
Bug description:  Per Directory Values are not applied correctly

Description:

According to
http://www.php-center.de/en-html-manual/configuration.changes.html, you are
able to change parts of the PHP-configuration on a per-directory-manner.
After setting the desired configuration options there and restarting IIS,
only the options for the first folder (if there are some folders/registry
keys within the same folder/key each configured with individual options)
are applied.
A trace with Regmon shows the W3WP enumerating and (successfully)
accessing all entries under the Per Directory Values-hive.

Reproduce code:
---
Setup at least 2 virtul hosts (located under C:\Inetpub\wwwroot\a and
C:\Inetpub\wwwroot\b).
Start Regedit, navigate to the key HKLM\Software\PHP
(HKLM\Software\Wow6432Node\PHP if you are on x64), create the subkey Per
Directory Values. This key gets a new subkey named c, that key gets one
named Inetpub, that one gets a subkey named wwwroot.
Now you create two keys (one named a, the other one named b) directly
below the key wwwroot.
Now, create a new string value called for example log_errors in both of
these keys and set that value to the opposite of the value defined in the
php.ini (for example 0).
Restart IIS, place a file named test.php in both physical virtual host
directory containing the following:
?php
echo 'log_errors = ' . ini_get('log_errors');
echo 'log_errors2 = ' . get_cfg_var('log_errors');
?

If you now launch your web browser, point it to virtual host A, the
correct values (as they were set in the registry) are being displayed.
If you do the same with host B, the default values (as set in the php.ini
or a registry key above the virtual host B configuration-key) (or NULL) are
beeing displayed, not the setting defined in the registry.

If you now delete the key a in the registry and restart IIS, the correct
value is displayed when you point your browser to virtual host B. If you
create a third virtual host C (folder: c), the settings stored in the
registry are applied only if there are no other hosts-settings defined
before (in alphabetical order, starting with a) that host in the same
registry-key.

The same issue also appears on a second server (same OS, same versions,
but different php.ini).
The issue applies both in safe- and non-safe mode.

Expected result:

The settings are being applied correctly on a per folder-level.

Actual result:
--
The settings are only applied to the first (in alphabetical order)
configured folder in a directory. Further details please see under
Reproduce code.

-- 
Edit bug report at http://bugs.php.net/?id=41233edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=41233r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=41233r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=41233r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=41233r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=41233r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=41233r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=41233r=needscript
Try newer version:http://bugs.php.net/fix.php?id=41233r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=41233r=support
Expected behavior:http://bugs.php.net/fix.php?id=41233r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=41233r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=41233r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=41233r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=41233r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=41233r=dst
IIS Stability:http://bugs.php.net/fix.php?id=41233r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=41233r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=41233r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=41233r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=41233r=mysqlcfg