You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Michael Turley <sa...@yahoo.com> on 2001/03/01 11:51:12 UTC

Passing control from one apache module to another

Hello,

I am writing an apache perl module which logs HTTP
environment variables. This is fine for static content
(html, images) but is a problem for dynamic content
such as php. 

I want my module to process the required HTTP
variables and seamlessly pass the http request back to
the control of other relevant apache modules.
Something like chaning content handlers but where I
can use other apache modules within the perl module
(or at least pass control between them). Does anyone
have an idea how to do this?

If I figure it out I'll let the list know (presuming
anybody is interested).



=====
Mr. Michael Turley
Gracious winner, Generous lover, All round great guy.

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

Re: Passing control from one apache module to another

Posted by Michael Turley <sa...@yahoo.com>.
You mean in httpd.conf? I could use that but what I
hoped to do was pull http vars into a database for
each server request. This is so someone could
interactively view accesses rather than reviewing
static pregenerated files. 

The overhead of opening and closing readonly
filehandles on different files which apache writes to
and then processing that data seems a little messier
than a simple sql insert.

I'm reading the apache modules book by L Stein and D
MacEachern to get a better understanding apache
internals. 


--- Perrin Harkins <pe...@primenet.com> wrote:
> > I am writing an apache perl module which logs HTTP
> > environment variables. This is fine for static
> content
> > (html, images) but is a problem for dynamic
> content
> > such as php. 
> 
> Why doesn't Log Format work for you?
> 
> - Perrin
> 


=====
Mr. Michael Turley
Gracious winner, Generous lover, All round great guy.

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

Re: Passing control from one apache module to another

Posted by Perrin Harkins <pe...@primenet.com>.
> I am writing an apache perl module which logs HTTP
> environment variables. This is fine for static content
> (html, images) but is a problem for dynamic content
> such as php. 

Why doesn't Log Format work for you?

- Perrin


Re: Passing control from one apache module to another

Posted by Matt Sergeant <ma...@sergeant.org>.
On Thu, 1 Mar 2001, Michael Turley wrote:

> Hello,
> 
> I am writing an apache perl module which logs HTTP
> environment variables. This is fine for static content
> (html, images) but is a problem for dynamic content
> such as php. 
> 
> I want my module to process the required HTTP
> variables and seamlessly pass the http request back to
> the control of other relevant apache modules.
> Something like chaning content handlers but where I
> can use other apache modules within the perl module
> (or at least pass control between them). Does anyone
> have an idea how to do this?
> 
> If I figure it out I'll let the list know (presuming
> anybody is interested).

Provided you do this in a mod_perl handler before mod_mime is called
(i.e. before the type handler phase), then it should just work. I suggest
doing it in a Trans (uri translate) handler, and return DECLINED.

-- 
<Matt/>

    /||    ** Founder and CTO  **  **   http://axkit.com/     **
   //||    **  AxKit.com Ltd   **  ** XML Application Serving **
  // ||    ** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** mod_perl news and resources: http://take23.org  **
     \\//
     //\\
    //  \\