ID:               41192
 User updated by:  martin at itmission dot com
 Reported By:      martin at itmission dot com
 Status:           Open
 Bug Type:         PHP options/info functions
 Operating System: Windows Server 2003
 PHP Version:      5.2.1
 New Comment:

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


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

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

------------------------------------------------------------------------

[2007-04-25 20:49:10] [EMAIL PROTECTED]

As documented in http://php.net/configuration.changes the registry keys
do not work with PHP_INI_PERDIR ini values.

You can see which ini value category it belongs to at:
http://php.net/manual/en/ini.php#ini.list

Only those marked PHP_INI_USER or PHP_INI_ALL will work.

------------------------------------------------------------------------

[2007-04-25 20:22:57] 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.


------------------------------------------------------------------------


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

Reply via email to