Mixing Apache::Filter with other mods like mod_php
Situation: I have a custom templating package that will lookup translation texts based off of keywords so we can use 1 html file for all 8-9 languages. I've made it part of an Apache::Filter list that also run's Apache::SSI so that any server side includes in the html file will also get run. There is also some mod_php code (a php require line that pulls in a different page graphic everytime they refresh the page) that I need to also 'run' as part of the web page. When I have this setup, it fails to run the php code... If I include custom tests to look for the php coding and run a subrequest of it using $r-load_file() then it takes over the entire request and just displays the results of the php coding. I'd like to just include the output of the php coding as part of my reply where it belongs. How can I make this work?
Re: Mixing Apache::Filter with other mods like mod_php
On Thu, 2003-07-24 at 12:48, Crispin Bivans wrote: Situation: I have a custom templating package that will lookup translation texts based off of keywords so we can use 1 html file for all 8-9 languages. I've made it part of an Apache::Filter list that also run's Apache::SSI so that any server side includes in the html file will also get run. There is also some mod_php code (a php require line that pulls in a different page graphic everytime they refresh the page) that I need to also 'run' as part of the web page. [...] How can I make this work? You can't in apache 1.x. In apache 2.x there is the ability to filter content in this way, but the filtering done in 1.x by Apache::Filter is really just at the mod_perl level so it can't deal with additional apache modules. The only way to actually get the PHP code to run is to make a separate request with something like LWP back to the server to run a PHP page, or maybe run it through the separate PHP executable with a system call. - Perrin
RE: Mixing Apache::Filter with other mods like mod_php
Thanks. I took the route of running a double pipe to a php command to send it the php text and read the results of it after processing. That was helpful. -Original Message- From: Perrin Harkins [mailto:[EMAIL PROTECTED] Sent: Thursday, July 24, 2003 8:57 AM To: Crispin Bivans Cc: [EMAIL PROTECTED] Subject:Re: Mixing Apache::Filter with other mods like mod_php On Thu, 2003-07-24 at 12:48, Crispin Bivans wrote: Situation: I have a custom templating package that will lookup translation texts based off of keywords so we can use 1 html file for all 8-9 languages. I've made it part of an Apache::Filter list that also run's Apache::SSI so that any server side includes in the html file will also get run. There is also some mod_php code (a php require line that pulls in a different page graphic everytime they refresh the page) that I need to also 'run' as part of the web page. [...] How can I make this work? You can't in apache 1.x. In apache 2.x there is the ability to filter content in this way, but the filtering done in 1.x by Apache::Filter is really just at the mod_perl level so it can't deal with additional apache modules. The only way to actually get the PHP code to run is to make a separate request with something like LWP back to the server to run a PHP page, or maybe run it through the separate PHP executable with a system call. - Perrin