Per Directory Values only work for one key
| Bug #41192 | Per Directory Values only work for one key | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Submitted: | 2007-04-25 20:22 UTC | Modified: | 2007-05-02 10:17 UTC |
|
||||||||||
| From: | martin at itmission dot com | Assigned: | dmitry (profile) | |||||||||||
| Status: | Closed | Package: | PHP options/info functions | |||||||||||
| PHP Version: | 5.2.1 | OS: | Windows Server 2003 | |||||||||||
| Private report: | No | CVE-ID: | None | |||||||||||
[2007-04-25 20:22 UTC] martin at itmission dot com
Description:
------------
I am trying to configure multiple websites under IIS using ISAPI. For each site I would like to configure specific PHP directives. My directives only work on the first entry I make (lexicographically, not chronologically).
Reproduce code:
---------------
Using Regedit
Add HKLM\Software\PHP\Per Directory Values\c\inetpub\www1\auto_prepend_file "c:\inetpub\www1\include1.php"
Add HKLM\Software\PHP\Per Directory Values\c\inetpub\www2\auto_prepend_file "c:\inetpub\www2\include2.php"
Files
Create c:\inetpub\www1\include1.php containing "<?php echo('1'); ?>"
Create c:\inetpub\www2\include2.php containing "<?php echo('2'); ?>"
Create c:\inetpub\www1\index.php containing "<?php echo('hello'); ?>"
Create c:\inetpub\www2\index.php containing "<?php echo('hello'); ?>"
IIS
Make the two sites (www1 and www2) and configure PHP on them.
Web Browser
Visit http://www1/index.php
Visit http://www2/index.php
Expected result:
----------------
http://www1/index.php:
1hello
http://www2/index.php:
2hello
Actual result:
--------------
http://www1/index.php:
1hello
http://www2/index.php:
hello
If I delete HKLM\Software\PHP\Per Directory Values\c\inetpub\www1, or rename it to HKLM\Software\PHP\Per Directory Values\c\inetpub\www3 http://www2/index.php changes:
2hello
However at that point www1 no longer prepends the file. This is the case with all directives, not just auto_prepend_file.
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2007-04-26 01:41 UTC] martin at itmission dot com
[2007-04-26 02:13 UTC] martin at itmission dot com
[2007-04-26 03:09 UTC] martin at itmission dot com
[2007-04-26 11:32 UTC] martin at itmission dot com
[2007-04-30 22:12 UTC] simon at bleif dot de