In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (will trillich) writes:
> from http://perl.apache.org/current/htdocs/manual/mod/mod_perl.html
> PerlModule directive
>
> Description: List of Perl modules
>
> Syntax: PerlModule Arg1 x n (ITERATE)
> PerlSyntax: push @PerlModule, $arg1
> Context: Allowed in *.conf anywhere and in .htaccess
> Override: Any other than None
> Status: Extension
> Module: mod_perl
>
> yet when i put 'PerlModule Serensoft::Auth' into
> the .htaccess file i consistently got
> [notice] child pid 30127 exit signal Segmentation fault (11)
>
> moving it back into the /etc/apache/httpd.conf file,
> all is sparkly again.
I'm seeing the same thing (or something quite similar) here:
Solaris 2.7/Sparc
Apache 1.3.12 (Stronghold)
mod_perl/1.24
egcs-1.1.1
My .htaccess file contains:
PerlModule Apache::TAGXSessionAuth
PerlAuthenHandler Apache::TAGXSessionAuth->authen
PerlAuthzHandler Apache::TAGXSessionAuth->authz
After attaching to a child process and getting the segv,
the stack looks like:
(gdb) where
#0 0x107810 in ap_push_array ()
#1 0x66a68 in perl_cmd_module ()
#2 0x10f840 in invoke_cmd ()
#3 0x10ff74 in ap_handle_command ()
#4 0x110054 in ap_srm_command_loop ()
#5 0x110aa8 in ap_parse_htaccess ()
#6 0x128ea0 in directory_walk ()
#7 0x12a784 in process_request_internal ()
#8 0x12ad3c in ap_process_request ()
#9 0x11e918 in child_main ()
#10 0x11ec90 in make_child ()
#11 0x11eda8 in startup_children ()
#12 0x11f694 in standalone_main ()
#13 0x120288 in main ()
If PerlModule is placed into the httpd.conf file,
all works well.
In further debugging, one thing I noted was that,
at the point ap_push_array() in perl_cmd_module()
is called, the cls structure looks like:
$3 = {PerlPassEnv = 0x522710, PerlRequire = 0x0, PerlModule = 0x0,
PerlTaintCheck = 0, PerlWarn = 0, FreshRestart = 0, PerlInitHandler = 0x0,
PerlPostReadRequestHandler = 0x0, PerlTransHandler = 0x0,
PerlChildInitHandler = 0x0, PerlChildExitHandler = 0x0, PerlRestartHandler = 0x0,
PerlOpmask = 0x0, vars = 0x522730}
I'm pretty sure that PerlModule=0 is wrong. When I place a
PerlModule directive into httpd.conf, it is not null (which
is why it works then).
I've a version 1.21 mod_perl also running, and this problem
doesn't occur there. I noticed that it only pushes the module
onto the PerlModule vector if perl is not already running. That
makes sense, as the vector is used in perl_startup() to determine
what to perl_require_module(). However, if perl was running,
the perl_require_module() is already done!
So I tried a return immediately after perl_require_module()'s
successful return in perl_cmd_module(). That appears to have
solved the problem.
But I'm very unfamiliar with this code, so I don't know that
this is the proper fix. Anyone else?
- Andrew