On Wed, 3 May 2000, Robert S. Thau wrote:
> then everything works as expected. My problems are:
>
> 1) If the ServerAdmin line is uncommented, then the server dumps
> core on startup. Backtrace included below.
this is fixed now in the cvs tree, with the patch below.
> 2) If I comment the ServerAdmin line back out, but change the 'do'
> in httpd.conf to a 'require', the server starts, but is not listening
> on ports 5050 and 5051 when it does. What makes this case peculiar
> is that with MOD_PERL_TRACE=ds, the output produced by the PERL_TRACE
> facility is the same in both cases; it claims to find and execute the
> Limit commands either way.
the output is probably only from the first pass, the second pass goes to
the error_log. in which case, you shouldn't see the output in
the error_log with 'require'
> This may have something to do with the 'require' not reading the file
> a second time... but if @INC is preserved, I would have expected the
> vars in the Apache::ReadConfig symbol table to be preserved as well.
conf.pl is cached in Perl's %INC, so on the second config read, it's not
parsed. you can prevent <Perl> from clearing %Apache::ReadConfig:: by
setting $Apache::Server::SaveConfig = 1; but, that'll persist for the
life of the child, unless you clear it yourself in a PerlChildInitHandler
or some such.
another approach is to put 'package Apache::ReadConfig' in your conf.pl
and pull it in via 'PerlRequire conf.pl'. mod_perl should delete the %INC
entry so Perl will parse conf.pl on the second config read.
> BTW, on another topic, what's up with support for <Perl> sections in
> Apache/2.0? Some of the discussion on new-httpd seems to indicate that
> it's not quite there yet...
yeah, the 2.0 config api is being debated, but it will support the hooks
needed for us to continue <Perl> support in mod_perl-2.0
--- src/modules/perl/perl_config.c 2000/04/03 04:48:53 1.94
+++ src/modules/perl/perl_config.c 2000/05/04 04:52:34 1.95
@@ -1748,7 +1748,7 @@
}
}
- if((hv = GvHV((GV*)val))) {
+ if((hv = GvHV((GV*)val)) && HvKEYS(hv)) {
perl_handle_command_hv(hv, key, parms, config);
}
else if((av = GvAV((GV*)val))) {