techperl has asked for the wisdom of the Perl Monks concerning the following question:

Hi ,
I am new to Apache and mod_perl, currently i am happened to work on that. I am facing some problem in using stacked handler in mod_perl2.0 which is working fine in mod_perl1.0
Below is the example,
<Location /query>
SetHandler perl-script
PerlHandler Apache::query Apache::display
</Location>
Here first handler is invoked but not the second, though 1st handler returns OK. Kindly help me out.

Replies are listed 'Best First'.
Re: Problem - Stack Handler in mod_perl2.0
by cbrandtbuffalo (Deacon) on Nov 24, 2008 at 13:31 UTC
    In mod_perl 2, the PerlHandler directive has been renamed PerlResponseHandler. PerlResponseHandler is a RUN_FIRST type and this means processing will stop when an OK is returned. To get multiple handlers to run, you need to return DECLINED or pick a different phase where all handlers run (type RUN_ALL). The solution depends on what you are doing in your handlers. The mod_perl 2 stacked handler docs might help.
Re: Problem - Stack Handler in mod_perl2.0
by ikegami (Patriarch) on Nov 24, 2008 at 13:25 UTC