note 45147 added to configuration.changes

From: Date: Fri, 27 Aug 2004 14:40:06 +0000
Subject: note 45147 added to configuration.changes
Groups: php.notes 
Request: Send a blank email to php-notes+get-75422@lists.php.net to get a copy of this message
Important info for Apache2 users that have several virtual hosts. It seems php_flag directive has a different behaviour under Apache 2 (from what it is under 1.3) when used inside <VirtualHost> block. If you override global php.ini settings with php_flag for one of your virtual host - then your other non-customized virtual hosts may use this overrided settings as well. php_flag records are messed up among different virtual hosts under single Apache 2 server. It may result from Apache 2 multi-thread nature. Here is an example: Suppose you have two Virtual hosts: V1 and V2. For V1 in Apache configuration you use php_flag magic_quotes_gpc 1 V2 is supposed to use global php.ini settings, so you didn't put any php_flag records into Apache conf for V2 (this worked under Apache 1.3). And your default php.ini settings are: php_flag magic_quotes_gpc 0 When you run your server you'll notice that magic quotes is (sometimes) set to On at V2! The value turns On at V2 when there have been a previous request to V1. To solve the problem either move php_flag into .htaccess located inside customized virtual host directory OR put php_flag with default settings into all your <VirtualHost> blocks that are not customized. So for V2 put: php_flag magic_quotes_gpc 0 My configuration is: PHP 4.3.4, Apache 2.0.50, Linux RedHat 9 ---- Manual Page -- http://www.php.net/manual/en/configuration.changes.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+45147 Delete -- http://master.php.net/manage/user-notes.php?action=delete+45147&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+45147&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#75422) next »