Malcolm J Harwood wrote:
On Tuesday 12 July 2005 06:23 am, Erik Scholtz wrote:
I have two vhosts, each running with a different project. Both projects
are using a "config.pm", located directly in the cgi-bin directory.
Now it happens, that the project1 uses the config.pm of project2 and
vice versa.
I have no idea, why this happens. Anyone of you a hint for me?
Sure. The problem is that modperl is persistant by design.
So what you get is:
server child 1 responds to project1 request, loads config.pm from
project1.
server child 2 responds to project2 request, loads config.pm from
project2.
server child 1 responds to project2 request, already has config.pm from
project1 loaded, uses that. ("use config" isn't
server child 2 responds to project1 request, already has config.pm from
project2 loaded, uses that.
You need to namespace the configs, (eg. Project1::Config) and make sure that
what they export doesn't overlap.
Also documented in deal at:
http://perl.apache.org/docs/1.0/guide/porting.html#Name_collisions_with_Modules_and_libs
:)
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com