ID:               41233
 Updated by:       [EMAIL PROTECTED]
 Reported By:      simon at bleif dot de
-Status:           Open
+Status:           Feedback
 Bug Type:         IIS related
 Operating System: Windows Server 2003 x64 R2 SP2
 PHP Version:      5.2.1
 New Comment:

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




Previous Comments:
------------------------------------------------------------------------

[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=41233&edit=1

Reply via email to