note 45147 deleted from configuration.changes by aidan

From: Date: Fri, 27 Aug 2004 15:14:14 +0000
Subject: note 45147 deleted from configuration.changes by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-75428@lists.php.net to get a copy of this message
Note Submitter: outofnet at mail dot ru ---- 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

« previous php.notes (#75428) next »