do you have a threaded Perl interpreter?
I also use .. PerlOptions +Parent ..
but in the vhost-config files (which should make no difference?)
and in the startup files of vhost 1
.. use lib /path1/lib.pm ..
and in the startup file of vhost 2
.. use lib /path2/lib.pm ..
This works for me.
Both lib.pm's are separated because new perl interpreters are used for vhost1 and vhost2.
Helmut
--On Friday, January 23, 2004 14:56:04 +0600 Alexander Shipitsyn <[EMAIL PROTECTED]> wrote:
Hello!
I have problem with caching of compiled my .pm modules (auto-compiled in memory by Apache::ASP and mod_perl) with same names for different sites on same Apache::ASP/apache machine.
I have 2 virtual hosts:
"site1" is for production site (homedir is .../site1)
and
"site2" is for developing site. (homedir is .../site2)
Homedirs are different.
I copied all files of site "site1" to home directory of site "site2" (Apache::ASP is configured via .htaccess files located in different site1 and site2 home directories).
Let my http-request-1 for site1 hit on apache-child-process-A and then my http-request-2 for site2 hit on same apache-child-process-A (apache-child-process-A processes multiple requests before die of apache-child-process-A).
During process of http-request-2 for site2, apache-child-process-A uses cache of my module Tools.pm from site1. This is some error for me!!! In fact, pm-module for site1 is used on site2 and module for site2 is not used.
If each apache-child-process processes only 1 request and then die, then all is Ok, no error occurs.
I known about issue "Why do variables retain their values between requests?" in FAQ and I always use my()/local() for not retain values of variables between requests. I have no problem with retain of variable values between requests. I have problem with messing modules with same names by Apache::ASP or/and by mod_perl.
If I change all names of used modules for site2 (e.g. Tools.pm -> Tools2.pm) or (seems to me; I not sure) change name of directory of site2 where Tools.pm is located inside of site2 root, then no errors occurs with using modules with same names in site1 and site2 code. This is bad method for avoid described error.
I have not special pre-compiled modules; all my pm-modules exists only in sources like Tools.pm.
My .htaccess settings is (selected): PerlOptions +Parent
------------------------ PerlSetVar NoState 0 PerlSetVar NoCache 1 PerlSetVar StatINC 1 PerlSetVar UseStrict 1
PerlSetVar StateDir /tmp/omsu_asp (^-- for site1)
PerlSetVar StateDir /tmp/omsutech_asp (^-- for site2) ------------------------ Note: StateDir is different for site1 and site2
My Tools.pm begin is: ----------------- package omtools; use strict; require Exporter; our @ISA = qw(Exporter); our @EXPORT = qw(sq utf8to1251 win1251toutf8 alltrim unicode2win); use Unicode::MapUTF8 qw(from_utf8 to_utf8); use Unicode::Map; use String::Strip; use XML::DOM;
sub bla-bla-bla...
1; -----------------
Using of my modules in pages code is: -------------------- use locale; use POSIX; use Time::localtime qw(localtime);
use omtools; use sysvar; use funcs;
use XML::DOM;
setlocale(LC_CTYPE, "ru_RU.cp1251");
my $time_start = ctime(time);
bla-bla-bla ----------------- Note: my pm-modules is omtools, sysvarm, funcs
Help me to solve this problem!
(My main task at this stage is make full clone of site1 on same Apache::ASP/apache engine)
Thanks!
-- Best regards, Alexander mailto:[EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
..................................... HZ-Labs Dr. Helmut Zeilinger Wiesengrund 2 D-86 684 Holzheim Tel. 08276/58767 Fax. 08276/´58787 www.hzlabs.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]