You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1)" <ma...@hp.com> on 2003/01/13 00:15:30 UTC

mod_perl & mod_jk

Hi,
	I'm trying to use mod_perl (1.99-07) with mod_jk (1.2) and Apache
(2.0.43). (and cannot move to 1.99-08 immediately)
When I try starting apache with both mod_perl & mod_jk enabled, I'm seeing
the following error :

$ sudo bin/apachectl start
Syntax error on line 8 of /opt/apache2/conf/mod_jk.conf:
Invalid command 'JkWorkersFile', perhaps mis-spelled or defined by a module
not included in the server configuration

Any ideas what might be happening ?..

Thanks
-Madhu

Re: mod_perl & mod_jk

Posted by Stas Bekman <st...@stason.org>.
MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1) wrote:
> Hi,
> 	I'm trying to use mod_perl (1.99-07) with mod_jk (1.2) and Apache
> (2.0.43). (and cannot move to 1.99-08 immediately)
> When I try starting apache with both mod_perl & mod_jk enabled, I'm seeing
> the following error :
> 
> $ sudo bin/apachectl start
> Syntax error on line 8 of /opt/apache2/conf/mod_jk.conf:
> Invalid command 'JkWorkersFile', perhaps mis-spelled or defined by a module
> not included in the server configuration
> 
> Any ideas what might be happening ?..

You say that it's working fine with 1.99_08, but I don't think anything 
significant has been changed in the configuration parsing between _07 
and _08. Have you tried stepping through with gdb?

It should be pretty easy to do if you use this script:
http://perl.apache.org/docs/2.0/devel/debug/code/.debug-modperl-register
as discussed here:
http://perl.apache.org/docs/2.0/devel/debug/c.html#Precooked_gdb_Startup_Scripts

You want to break at ap_find_command_in_modules, where the directive is 
searched for. It simply goes though the list of registered modules and 
asks each module whether it knows this command:

     for (modp = *mod; modp; modp = modp->next) {
         if (modp->cmds && (cmdp = ap_find_command(cmd_name, modp->cmds))) {
             *mod = modp;
             return cmdp;
         }
     }

If you see that mod_jk is not in that list, you have to go back earlier 
and see why it failed to get mod_jk into the list. Somewhere around
ap_add_module.

p.s. I use ddd over gdb, which makes the debugging a much easier task.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com