On Thu, 14 Dec 2000, Mark Bathie wrote:

> Hi all,
> 
> I want to run a production and a development version of my mod-perl web
> page on the same apache server. The production and development code
> lives in separate directories and all code is the same (excluding
> database name). Some of the code to generate the web page and to connect
> to the back end database is tied up in custom written modules that
> I wrote. The module (DB.pm) that connects to my database has the
> database name imbedded within, so for example if I were to view the
> production web page, mod-perl will happily go away connect to the
> production database. Now If I come along and view the development
> version of the web page, mod-perl will realise that DB.pm is already
> stored in cache and it won't reload the module. So in effect I have
> connected to the production database via the development web page.
> 
> The problem I see here relates to the production and development
> versions having the same name for their database connectivity modules
> (DB.pm). I can code around this, but it would be very messy, and I would
> like to avoid making code changes and I want my dev and prod source
> codes to be the same. Is there any way of storing the module name
> distinctivly with apache (other than the default of using the module
> name) ? any other suggestions ?

First, why do you run both in the same server? Run two servers
instead. The mod_perl guide full of information on how to do that.

If you still insist on keeping your setup, look at creating virtual hosts,
see PerlVINC in the guide http://perl.apache.org/guide.


_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/  


Reply via email to