Hi!  I had a question regarding where I should be placing global configuration options 
in mod_perl.  Here's the qweekie scenario:

I want to load a configuration file of various options (such as db arguments, system 
directories, db connections, etc.) into a hash or perl object global to Apache so that 
my mod_perl handlers have access to this variable/object, kinda like the %ENV variable 
except that I wish to keep these pieces of information separate from the %ENV 
variable.  Initially, I thought about loading this configuration information in a 
startup script and using the PerlRequire directive to load this script.  However, 
since doing this code will run under root privileges, would it be a good idea to place 
this type of information in this file?  Also, I read about issues of database handlers 
becoming unstable across forks.  So should I place this initialization information 
into a perl child init handler?

Second if I want to utilize virtual hosting on a single machine with mod_perl loaded 
into certain hosts, what would this situation do in terms of allowing those hosts to 
access these variables?  What should I do if I want a kind of separate configuration 
environment per virtual host in mod_perl and to load that configuration environment up 
before a request to improve performance?

Thanks!



--------------------------------------------------------------------------

Spring Break pics and more on CollegeClub.com!
Catch all the photos, fun and festivities.
<http://navisite.collegeclub.com/springbreak/> 

Reply via email to