On Mon, May 07, 2001 at 04:21:29PM -0400, Benoit Caron wrote:
> Hello.
> 
> I'm trying to isolate the developper environment from each other so that 
> when someone mess up the server, the others just simply don't know that 
> something happened. So, every developpers will have their own webserver.
> 
> Since I want to be able to have potentially different copies of Perl 
> modules (like, say, two developpers are working on things that are in the 
> same modules), I can't simply load different virtual host for each 
> developpers: they have their own copy of Apache+mod_perl.
> 
> The way I've setup whole thing is like that : a script name restart is 
> called with some parameters telling him to reload one or all the 
> developpers environment, or the "testing" copy. This script would have some 
> environments variables called SITE_USER and SITE_USER_PORT that will give 
> me the value (read in a file defining the different users) of the username 
> (and by the same way the files path) and the port where the user should work.
> 
> My problem is that my envirnoment variables are not set. If I do a 
> Dumper(\%ENV), I only got values for the variables TZ, GATEWAY_INTERFACE, 
> MOD_PERL and PATH. (I do double-check that my variables where well setup).
> 
> I've read in the Eagle book that the environment is cleaned up on server 
> start, but I tought that I could read it in "raw" form in the perl 
> configuration...
> 
> The only way I still see to make it work is having my "restart" script 
> saving the current user/port in a file and letting the <perl> section read 
> it's configuration from there. But it look so patchy...
> 
> Is there another way to do this?

http://thingy.kcilink.com/modperlguide/config/PerlSetVar_PerlSetEnv_and_PerlP.html

The problem is that mod_perl handles %ENV at request time, and it's not normally 
avaliable
during startup.  So you should make use of the

PerlPassEnv SIDE_USER
PerlPassEnv SITE_USER_PORT

Wich will make sure they are always set for you.  This exists mostly for performances 
reason,
as setting up the 'magic' %ENV is quite expensive.

Hope this helps

> Thanks for any advice
> 
> 
> Benoit Caron
> Analyste-Programmeur
> Netgraphe - Webfin.com - Le Web Financier
> [EMAIL PROTECTED]
> - - - - - - - - - - - - - - - - - - - - - - - -
> "The number of Unix installations has grown to 10,
>   with more expected."
> -- The Unix Programmer's Manual, 2nd edition, June '72
> 
> 

-- 

Reply via email to