Re: Running multiple copies of same site in ModPerl
gAzZaLi <[email protected]>
| Newsgroups | gmane.comp.apache.mod-perl |
|---|---|
| Message-ID | <[email protected]> |
Hello, What you're doing is not recommended as you run into namespace issues. Perl caches files and modules that were loaded in %INC, so if you have files and modules with the same name, only one of them gets loaded. Possibly, as an exercise, if you switch the order of the ORIG and COPY lines in your startup.pl, you'll see the changes you've made in ORIG and not the changes in COPY. I've made the assumption here that your site is more than just the one base.pm file and both base.pm packages use other packages with the same names. Suppose your ORIG::mods::base.pm has "use mods::somepackage" and COPY::mods::base.pm has "use mods::somepackage", with the startup.pl file, Perl will load only the .../perl/COPY/mods/somepackage.pm file. If however your site is just the base.pm file, and the package declaration is as you've written, my answer is off. Good luck. g. On 11/29/2011 7:29 PM, Nishikant Kapoor wrote: > Hello List, > > I have been running a ModPerl site fine with following configuration. > The problem started when I made a complete copy of the original site and > tried to run the two in the same environment. For some reason, calling > up the ORIG site (http://127.0.0.1/ORIG/) now calls the COPY site at > http://127.0.0.1/COPY/. None of the changes made in ORIG::MODS::base.pm > are getting picked up even after restarting the apache server. However, > changes to COPY::MODS::base.pm are showing up fine. > > Would appreciate any help. Here is what I have in the config: > > /etc/httpd/conf/httpd.conf: > --------------------------- > PerlRequire /var/www/perl/startup.pl > <Location /ORIG> > SetHandler perl-script > PerlResponseHandler ORIG::MODS::base > </Location> > > <Location /COPY> > SetHandler perl-script > PerlResponseHandler COPY::MODS::base > </Location> > > /var/www/perl/startup.pl: > ------------------------- > use lib qw(/var/www/perl); > use lib qw(/var/www/perl/ORIG); > use lib qw(/var/www/perl/COPY); > 1; > > Apache/2.2.14 (Mandriva Linux/PREFORK-1mdv2010.0) > apache-mod_perl-2.0.4-11mdv2010.0 > This is perl, v5.10.1 (*) built for x86_64-linux-thread-multi > > Thanks, > Nishi > > >