Bug #4121: Apache .conf directive problem
| From: | jeremiah at emphasys dot net | Date: | Wed, 12 Apr 2000 23:34:14 +0000 |
| Subject: | Bug #4121: Apache .conf directive problem | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-17851@lists.php.net to get a copy of this message | ||
From: jeremiah@emphasys.net
Operating system: Redhat 6.1
PHP version: 3.0.16
PHP Bug Type: Other
Bug description: Apache .conf directive problem
During an upgrade from PHP 3.0.12 to PHP 3.0.16,
I discovered the following unexpected/changed behavior
from Apache .conf directive parsing.
I think this may be a result of the patch to mod_php3.c between releases
3.0.12 and 3.0.13:
Revision 1.93 Sat Sep 18 22:12:09 1999 UTC by rasmus
Changed since 1.92: +57 -54 lines
I think this should finally fix the Apache .conf directive problems
related to overriding directives set at higher levels inside sub-dirs
Example:
php3.ini
########
...
engine = Off ; disable PHP 3.0 parser by default
magic_quotes_gpc = On ; magic quotes for incoming GET/POST/Cookie data
...
httpd.conf
##########
...
<VirtualHost _default_:*>
...
DocumentRoot /www/apache/htdocs
php3_engine on
# Files in test/ dir are parsed as expected
# but only because we have given "php3_engine on"
<Directory /www/apache/htdocs/test>
php3_engine on
php3_magic_quotes_gpc Off
</Directory>
# Files in test/subdir/ are not parsed by php
# It seems php3.ini engine = Off is reapplied
# ignoring that the parent dir's "php3_engine on"
<Directory /www/apache/htdocs/test/subdir>
php3_magic_quotes_gpc On
</Directory>
# Files in test2/ are not parsed by php
# It seems php3.ini engine = Off is reapplied
# ignoring the VirtualHost's "php3_engine on"
<Directory /www/apache/htdocs/test2>
php3_magic_quotes_gpc Off
</Directory>
...