httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manfred Rebentisch <>
Subject Call PHP from my module?
Date Fri, 01 Dec 2006 16:54:10 GMT
I use an own apache 2 module (not filter, it is a handler!), written in C, 
using apr. The module handler works on a VHost and generates dynamic HTML 
with database content.

It works fine and I want to enhance the code for using embedded PHP.

If I do the final parsing, writing the bucket brigades, I want to handle 
embedded PHP-Code ( between <?php ... ?> ). Can someone give me a tip, how to 
call PHP at this point?

At the moment I call ap_pass_brigade(apReq->output_filters, bb); where 'bb' is 
the bucket brigade, return OK back to apache.
The I do install with 
ap_hook_handler         (cp_handler, NULL, NULL, APR_HOOK_FIRST);
ap_hook_handler         (cp_handler, NULL, NULL, APR_HOOK_MIDDLE);
ap_hook_handler         (cp_handler, NULL, NULL, APR_HOOK_LAST);
  static const char * const successors[] = {  "mod_php5.c", NULL };
  ap_hook_handler         (cp_handler, NULL, successors, APR_HOOK_FIRST);

with no difference.

Thank you in advance


View raw message