in reply to mod_perl and ssi: mixing it up

(Actually, it's mod_include, not mod_ssi. I think.)

To the OP: take a look at Apache::SSI.

Also read about output chaining--as mdillon said, you should be able to set up your config so that output from your program goes through mod_include.

Replies are listed 'Best First'.
RE: Re: mod_perl and ssi: mixing it up
by mdillon (Priest) on May 22, 2000 at 23:59 UTC
    mod_include... that's what i meant. thanks.

    also, although i've heard about this "output chaining" on mailing lists, i could not find any documentation on it just now to enhance my previous post with. am i correct that this is an Apache-2.0-only feature?

      I don't think so. I'm pretty sure it's possible, using mod_perl, in versions less than 2.0. Although you may be right that the support for *module* chaining (as opposed to stacked Perl handlers) comes with 2.0.

      There's a module called Apache::OutputChain, and there's another called Apache::Filter. Both do sort of the same thing: they let you chain together several modules, with each successive module being able to write to/affect STDOUT.

      The OP should probably take a look at these modules. In particular, Apache::Filter might work for him, in combination with Apache::SSI. Something like this in httpd.conf:

      PerlModule Apache::Filter; <Files /foo> SetHandler perl-script PerlSetVar Filter On PerlHandler YourModule Apache::SSI </Files>
      In YourModule, just print to STDOUT (or $r->print, I suppose). This output will be filtered through Apache::SSI, which (I believe) should fill in the includes.

      Mind you, I've never done this myself.