It's Apache 1.3.9, mod_perl 1.21 on Linux.

The only change I have is patch for correcting PATH enviroment
corruption provided by Doug.

Andrei

On Tue, Nov 16, 1999 at 05:29:46PM +0100, Eric Cholet wrote:
> Which version of mod_perl are you using, 1.21 or the CVS version perhaps?
> 
> > Hi!
> > 
> > I've encountered very interesting problem. When I set some variable
> > using PerlSetVar in configuration files for different virtual servers
> > they seem to be available to ALL of those virtual servers.
> > 
> > Here's details to clarify.
> > 
> > In httpd.conf I have
> > 
> > <VirtualHost myhost1.domain.com>
> > ServerName   myhost1.domain.com
> > DocumentRoot /httpd/docs
> > ErrorLog logs/httpd-errors
> > CustomLog logs/httpd-log common
> > AccessConfig conf/access.conf
> > ResourceConfig conf/srm.conf
> > </VirtualHost>
> > 
> > <VirtualHost myhost2.domain.com>
> > ServerName   myhost2.domain.com
> > DocumentRoot /httpd/docs
> > ErrorLog logs/httpd2-errors
> > CustomLog logs/httpd2-log common
> > AccessConfig conf/access2.conf
> > ResourceConfig conf/srm2.conf
> > </VirtualHost>
> > 
> > 
> > Now in srm.conf I set
> > 
> > PerlSetVar MyVariable MyValue
> > PerlAuthenHandler        Apache::Myhandler
> > 
> > 
> > And in srm2.conf I have
> > 
> > PerlSetVar MyVariable2 MyValue2
> > PerlAuthenHandler        Apache::Myhandler
> > 
> > In Myhandler::handler I do 
> > $myvar1 = $r->dir_config('MyVariable');
> > $myvar2 = $r->dir_config('MyVariable2);
> > 
> > if($myvar1){
> > ## do stuff for first virtual server
> > }else{
> > ## do stuff for the second one
> > }
> > 
> > But $myvar1 appears to be ALWAYS set. Which leads me to belief that
> > mod_perl "shares" variables between virtual servers if those variables
> > are not explicitly set in configuration for that server.
> > 
> > Is this supposed to be this way? Or am I missing something?
> > 
> > Andrei
> > 
> > -- 
> 

-- 

Reply via email to