Re: Serious bug, mixing mod-perl content
mire wrote: > Beta contains new code and www is old code. We were calling www but once a > while beta would pop in. We noticed error messages that were giving whole > stack trace (caller) but those error messages were not present in www code, > they are implemented as a change in beta code. Are you sure you aren't just having namespace problems? If this code is in a module which has the same name for both versions, you can only have one version loaded in each perl interpreter. - Perrin
Re: Serious bug, mixing mod-perl content
Beta contains new code and www is old code. We were calling www but once a while beta would pop in. We noticed error messages that were giving whole stack trace (caller) but those error messages were not present in www code, they are implemented as a change in beta code. Right now we solved the problem by moving beta to a totally different domain. We'll make a large test eventually. Everything seems ok, double checked with a help from my business partner, the paths are different, names are different etc. " Could you describe the actual nature of the error? How can you tell that the response you're getting is from the wrong virtual host and what is different about the virtual hosts' setup that causes the difference in responses? " -- Best regards, Miroslav Madzarevic, Senior Perl Programmer [EMAIL PROTECTED] Mod Perl Development http://www.modperldev.com Telephone: +381 64 1193 501 jamph $_=",,.,,.,,,.,,,.,,,..,,.,,,.,.,,,"; s/\s//gs;tr/,./05/;my(@a,$o,$i)=split//;$_=;tr/~`'"^/0-4/;map{$o .=$a[$i]+$_;$i++}split//;@a=$o=~m!...!g;map{print chr}@a; __DATA__ `~^`~~``^`~`~`^``~`~``''~^'`~^``'``^```~^``'```'~`~
Re: Serious bug, mixing mod-perl content
Could you describe the actual nature of the error? How can you tell that the response you're getting is from the wrong virtual host and what is different about the virtual hosts' setup that causes the difference in responses? - Perrin
Re: Serious bug, mixing mod-perl content
> Miroslav Madzarevic wrote: > > Ernest: I don't use server aliases but I'm going to fix that. I wish > that the problem is so simple. Actually the two virt. hosts are > beta.domain.com and www.domain.com > So the httpd.conf should read: ServerName www.domain.com ServerAlias *.domain.com ServerAlias domain.com # ... ServerName beta.domain.com # no alias! # ... So every request except for beta.domain.com will go to the first VH: The order of the VirtualHost-entries in httpd.conf are important - see http://httpd.apache.org/docs/vhosts/details.html Ernest -- * * VIRTUALITAS Inc. * * ** * * European Consultant Office * http://www.virtualitas.net * * Internationales Handelszentrum * contact:Ernest Lergon * * Friedrichstraße 95 *mailto:[EMAIL PROTECTED] * * 10117 Berlin / Germany * ums:+49180528132130266 * *
Re: Serious bug, mixing mod-perl content
Stas: I have 1.24 ver. of mod-perl and as I see current Apache Registry sets $Apache::Registry::NameWithVirtualHost explicitly to 1 if it's not defined (I've seen the sources). These are apache's startup messages: [Fri Mar 1 11:47:28 2002] [notice] Apache-AdvancedExtranetServer/1.3.14 (Linux-Mandrake/2mdk) mod_perl/1.24 configured -- resuming normal operations[Fri Mar 1 11:47:28 2002] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) Ernest: I don't use server aliases but I'm going to fix that. I wish that the problem is so simple. Actually the two virt. hosts are beta.domain.com and www.domain.com Christian: The setup is consisting of two httpd's, one without mod-perl and one with mod-perl. First apache serves as a proxy to a second one using mod-proxy and mod-rewrite. The second one is mod-perl enabled and hosts Apache::Registry scripts. First one hosts plain cgi-scripts.On both apaches there are two virt hosts, first apache one contains world viewable virt. hosts and the second one contains internal virt hosts (accessible only from 127.0.0.1, from first apache). The names and paths are different but the error occurs, although it's very rare. I'm not using HTML::Mason here. I noticed the error when I got error messages from beta which contains new code and I was actually working with www. tnx. for suggestions -Best regards, Miroslav Madzarevic, Senior Perl Programmer[EMAIL PROTECTED]Mod Perl Development http://www.modperldev.comTelephone: +381 64 1193 501jamph $_=",,.,,.,,,.,,,.,,,..,,.,,,.,.,,,";s/\s//gs;tr/,./05/;my(@a,$o,$i)=split//;$_=;tr/~`'"^/0-4/;map{$o.=$a[$i]+$_;$i++}split//;@a=$o=~m!...!g;map{print chr}@a; __DATA__`~^`~~``^`~`~`^``~`~``''~^'`~^``'``^```~^``'```'~`~
Re: Serious bug, mixing mod-perl content
> Miroslav Madzarevic wrote: > > I have virthost1 and virthost2 on mod-perl apache, most of the time > you get the right content when calling respective virthost but > sometimes when you call virthost2 you get response from virt. host 1. > This is a rare bug but happens. > Do you have this in your httpd.conf? ServerName www.virthost1.de ServerAlias *.virthost1.de ServerAlias virthost1.de # ... ServerName www.virthost2.de ServerAlias *.virthost2.de ServerAlias virthost2.de # ... If ServerAlias for the virthost2 is missing and the user types the server name without 'www', the pages will be served from the first server apache finds. I use it like above - just as wearing braces and belt ;-)) Ernest -- * * VIRTUALITAS Inc. * * ** * * European Consultant Office * http://www.virtualitas.net * * Internationales Handelszentrum * contact:Ernest Lergon * * Friedrichstraße 95 *mailto:[EMAIL PROTECTED] * * 10117 Berlin / Germany * ums:+49180528132130266 * *
Re: Serious bug, mixing mod-perl content
Basel, Dienstag, 12. März 2002, 19:27:24 . Hello Miroslav Assuming, that you are using a handler, I ask you how you separate each calls to your vhosts? I also assume that the vhosts are on the same Apache runtime? Probably you mix up namespaces ... Best Regards Christian - [EMAIL PROTECTED] - . == beginn original == Date: Dienstag, 12. März 2002, 18:32:57 Subject: Serious bug, mixing mod-perl content It seems that my mod-perl virtual hosts are mixing content :( I don't know why ? I have virthost1 and virthost2 on mod-perl apache, most of the time you get the right content when calling respective virthost but sometimes when you call virthost2 you get response from virt. host 1. This is a rare bug but happens. We're using Mandrake Linux and it's 2 apache's (1 mod-perl enabled and the other without mod-perl - this one uses mod proxy and mod rewrite). Can someone please direct me how can I solve this problem ? - Best regards, Miroslav Madzarevic, Senior Perl Programmer [EMAIL PROTECTED] Mod Perl Development http://www.modperldev.com Telephone: +381 64 1193 501 jamph $_=",,.,,.,,,.,,,.,,,..,,.,,,.,.,,,"; s/\s//gs;tr/,./05/;my(@a,$o,$i)=split//;$_=;tr/~`'"^/0-4/;map{$o .=$a[$i]+$_;$i++}split//;@a=$o=~m!...!g;map{print chr}@a; __DATA__ `~^`~~``^`~`~`^``~`~``''~^'`~^``'``^```~^``'```'~`~ === end original
Re: Serious bug, mixing mod-perl content
Miroslav Madzarevic wrote: > It seems that my mod-perl virtual hosts are mixing content :( > > I don't know why ? > > > > I have virthost1 and virthost2 on mod-perl apache, most of the time you > get the right content when calling respective virthost but sometimes > when you call virthost2 you get response from virt. host 1. This is a > rare bug but happens. > > > > We're using Mandrake Linux and it's 2 apache's (1 mod-perl enabled and > the other without mod-perl - this one uses mod proxy and mod rewrite). > > Can someone please direct me how can I solve this problem ? Could this be your problem? http://perl.apache.org/guide/config.html#A_Script_From_One_Virtual_Host_C -- _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: Serious bug, mixing mod-perl content
Are you using 2 separate apache processes or 2 virtual hosts within the same apache process? If it's the latter, according to Apache's documentation: "If no matching virtual host is found, then the first listed virtual host that matches the IP address will be used." (http://httpd.apache.org/docs/vhosts/name-based.html) So it's possible that the client that is getting the wrong answers is not specifying the Host: hostname parameter in the HTTP request and Apache is therefore sending the request to the first virtual host. Steve On Tue, 12 Mar 2002, Miroslav Madzarevic wrote: > It seems that my mod-perl virtual hosts are mixing content :( > I don't know why ? > > I have virthost1 and virthost2 on mod-perl apache, most of the time you get the >right content when calling respective virthost but sometimes when you call virthost2 >you get response from virt. host 1. This is a rare bug but happens. > > We're using Mandrake Linux and it's 2 apache's (1 mod-perl enabled and the other >without mod-perl - this one uses mod proxy and mod rewrite). > > Can someone please direct me how can I solve this problem ? > - > Best regards, > > Miroslav Madzarevic, Senior Perl Programmer > [EMAIL PROTECTED] > Mod Perl Development http://www.modperldev.com > Telephone: +381 64 1193 501 > jamph > > $_=",,.,,.,,,.,,,.,,,..,,.,,,.,.,,,"; > s/\s//gs;tr/,./05/;my(@a,$o,$i)=split//;$_=;tr/~`'"^/0-4/;map{$o > .=$a[$i]+$_;$i++}split//;@a=$o=~m!...!g;map{print chr}@a; __DATA__ > `~^`~~``^`~`~`^``~`~``''~^'`~^``'``^```~^``'```'~`~ > -- === Stephen M. Gray www.frontiermedia.net