Randy Kobes wrote:
On Sat, 12 Apr 2003, Stas Bekman wrote:
Randy Kobes wrote:
On Sat, 12 Apr 2003, Stas Bekman wrote: [ .. ]
Hmm, here is a wild guess. Could it be that this change has
caused the trouble?
http://cvs.apache.org/viewcvs.cgi/modperl-2.0/t/conf/modperl_extra.pl.diff?r1=1.24&r2=1.25&diff_format=h
Undoing this addition does change things (see below), so this looks on the right track, but there's still problems ... I'll search around this date ...
so it still happens during the destruction. Well it's definitely the change of moving mips before modules are required has caused this problem. Since this test committed separately, you didn't see the problem when reverting that change, I think.
You're exactly right though that this is where the problem is - I
had undone the above particular change, but there was another one
involving Apache->server->add_config() that was still present.
Reverting to the March 24th t/conf/modperl_extra.pl (which
doesn't have any Apache->server->add_config() calls), but keeping
everything else at the current cvs level, allows the tests to
run.
Thanks, Randy. Now need to imagine why would win32 have problems with this change.
There's a handful of failures now, but that might be another related, or unrelated, problem.
Randy, back to the drawing board. Can you try this patch (you will need to rerun t/TEST -conf). This is regarding the win32 issue you had with this change:
http://cvs.apache.org/viewcvs.cgi/modperl-2.0/t/conf/modperl_extra.pl.diff?r1=1.24&r2=1.25&diff_format=h
I have restored it now in a separate vhost. I'm not sure though if I have reproduced the problem as it was originally. Hope you remember what was it.
--- /dev/null 1969-12-31 16:00:00.000000000 -0800 +++ t/htdocs/vhost/startup.pl 2003-08-23 11:06:00.000000000 -0700 @@ -0,0 +1,32 @@ +use Apache2; +use Apache::ServerUtil (); +use Apache::Server (); +use Apache::Process (); + +use File::Spec::Functions qw(catdir); + +# gives us the current vhost's server + +my $s = Apache->server; +my $p = $s->process->pool; + +# XXX: how do we get the docroot for the vhost? there is no such method +my $doc_root = catdir Apache::server_root, qw(htdocs vhost); + +# testing $s->add_config() in vhost +my $conf = <<"EOC"; +# must use PerlModule here to check for segfaults +PerlModule TestVhost::basic +PerlSetVar DocumentRoot $doc_root +<Location /TestVhost__basic> + SetHandler modperl + PerlResponseHandler TestVhost::basic +</Location> +EOC + +$s->add_config([split /\n/, $conf]); + +# this used to have problems on win32 +$s->add_config(['<Perl >', '1;', '</Perl>']); + +1;
--- /dev/null 1969-12-31 16:00:00.000000000 -0800
+++ t/vhost/basic.t 2003-08-22 21:59:17.000000000 -0700
@@ -0,0 +1,30 @@
+# the handler is configured in modperl_extra.pl via
+# Apache->server->add_config
+
+use Apache::TestUtil;
+use Apache::TestRequest 'GET';
+
+my $config = Apache::Test::config();
+my $module = 'TestVhost::basic';
+my $path = Apache::TestRequest::module2path($module);
+
+Apache::TestRequest::module($module);
+my $hostport = Apache::TestRequest::hostport($config);
+
+t_debug("connecting to $hostport");
+my $res = GET "http://$hostport/$path";
+
+if ($res->is_success) {
+ print $res->content;
+}
+else {
+ if ($res->code == 404) {
+ die "this test gets its <Location> configuration added via " .
+ "[EMAIL PROTECTED]@/vhost/startup.pl, this could be the cause " .
+ "of the failure";
+ }
+ else {
+ die "server side has failed (response code: ", $res->code, "),\n",
+ "see t/logs/error_log for more details\n";
+ }
+}--- /dev/null 1969-12-31 16:00:00.000000000 -0800
+++ t/response/TestVhost/basic.pm 2003-08-22 22:45:19.000000000 -0700
@@ -0,0 +1,62 @@
+package TestVhost::basic;
+
+# Test whether vhost with 'PerlOptions +Parent', which doesn't inherit
+# from the base, has its own INC and therefore can have a modules with
+# the same namespace as the base, but different content.
+#
+# Also see the parallel TestDirective::perlmodule handler
+
+use strict;
+use warnings FATAL => 'all';
+
+use Apache::Test;
+use Apache::TestUtil;
+
+use Apache::RequestUtil ();
+
+use File::Spec::Functions qw(catdir);
+
+use Apache::Const -compile => 'OK';
+
+my $vars = Apache::Test::config()->{vars};
+
+sub handler {
+ my $r = shift;
+
+ plan $r, tests => 1;
+
+ {
+ my $expected = $r->document_root;
+ my $received = $r->dir_config->get('DocumentRoot');
+ ok t_cmp($expected, $received, "Vhost DocumentRoot");
+ }
+
+ Apache::OK;
+}
+
+1;
+__END__
+<NoAutoConfig>
+<VirtualHost TestVhost::basic>
+ DocumentRoot @documentroot@/vhost
+
+ <IfDefine PERL_USEITHREADS>
+ # a new interpreter pool
+ PerlOptions +Parent
+ </IfDefine>
+
+ # use test system's @INC
+ PerlSwitches [EMAIL PROTECTED]@
+ PerlRequire "@serverroot@/conf/modperl_inc.pl"
+ PerlRequire "@documentroot@/vhost/startup.pl"
+
+ # <Location /TestVhost__basic> config is added via add_config in
+ # t/htdocs/vhost/startup.pladd_config_startup.pl
+#PerlModule TestVhost::basic
+#PerlSetVar DocumentRoot @documentroot@/vhost
+#<Location /TestVhost__basic>
+# SetHandler modperl
+# PerlResponseHandler TestVhost::basic
+#</Location>
+</VirtualHost>
+</NoAutoConfig>
__________________________________________________________________ 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
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
