Brenda Washington wrote:
> I'm getting this error when running a test in mod_perl. I've looked at the 
> httpd.conf file and I can't figure out
> what's causing this error, or how to fix it. How do I re-define the value at 
> line 2107? 
> 
> [Tue Nov 15 14:36:14 2005] [info] 0 APR:: modules loaded
> [Tue Nov 15 14:36:14 2005] [info] base server + 27 vhosts ready to run tests
> .............   (in cleanup) Can't call method "push_handlers" on an 
> undefined value at /opt/apache/mod_perl-2.0.1/t/conf/httpd.conf line 2107.
> Syntax error on line 2094 of /opt/apache/mod_perl-2.0.1/t/conf/httpd.conf:
> \t(in cleanup) Can't call method "push_handlers" on an undefined value at 
> /opt/apache/mod_perl-2.0.1/t/conf/httpd.conf line 2107.\n
> 
> This is the area in my httpd.conf where the error messages are generated 
> from. 
>
> # APACHE_TEST_CONFIG_ORDER 1000
> Listen 0.0.0.0:8561
> <VirtualHost _default_:8561>
>     ServerName localhost:8561
>     PerlModule            TestHooks::push_handlers_anon
>     <Perl >
>         # want to push a handler for a vhost, via $s, but the only way to
>         # get $s for vhost is to traverse the vhosts list
>         use Apache::Test;
>         use Apache::TestRequest;
>         Apache::TestRequest::module('TestHooks::push_handlers_anon');
>         my $hostport = Apache::TestRequest::hostport(Apache::Test::config());
>         my($host, $port) = split ':', $hostport;
>         my $s = Apache2::ServerUtil->server;
>         my $vs = $s->next;
>         for (; $vs; $vs = $vs->next) {
>         last if $port == $vs->port
>         }

Smells like this loops falls through without finding the correct vhost.
Can you dump out $host, $port and the final value of $vs ?

--------------------------------------------------------------------------------
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/     F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to