You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Surat Singh Bhati <su...@indiamart.com> on 2001/02/25 16:27:56 UTC

possible solution for "exec cgi SSI" in mod_perl

Hi,

I am using lots of exec cgi SSI in my site, all the 
CGI called using exec are written in perl.
<!--#exec cgi="standardcgi.cgi"-->

I want to take advantage of mod_perl for performance,
but as I know "exec" will run as mod_cgi , not as mod_perl.

Can I use <!--#include virtual="modperlscript.pl"--> ?
If above will run, will be run as a sub request.. ? 

Any other better solution to server the page included mod_perl scripts 
SSI in it, without running the subrequest/new process? 

Regards,

-Surat Singh Bhati







RE: possible solution for "exec cgi SSI" in mod_perl

Posted by Jamie Krasnoo <we...@myeboard.com>.
Here's another way around it. You could use HTML::Template in place of SSI.

Jamie

-----Original Message-----
From: Surat Singh Bhati [mailto:surat@indiamart.com]
Sent: Sunday, February 25, 2001 7:28 AM
To: modperl@apache.org
Subject: possible solution for "exec cgi SSI" in mod_perl


Hi,

I am using lots of exec cgi SSI in my site, all the 
CGI called using exec are written in perl.
<!--#exec cgi="standardcgi.cgi"-->

I want to take advantage of mod_perl for performance,
but as I know "exec" will run as mod_cgi , not as mod_perl.

Can I use <!--#include virtual="modperlscript.pl"--> ?
If above will run, will be run as a sub request.. ? 

Any other better solution to server the page included mod_perl scripts 
SSI in it, without running the subrequest/new process? 

Regards,

-Surat Singh Bhati







Re: possible solution for "exec cgi SSI" in mod_perl

Posted by Steve Reppucci <sg...@logsoft.com>.
If you build modperl with 'perl Makefile.PL EVERYTHING=1' (or, at least
with 'PERL_SSI=1', then your server side includes will have an additional
option that looks like this:

  <!--#perl sub="DoSomething"-->

This will invoke routine 'DoSomething' when this page is expanded.
You'll need to pre-load your module with a PerlRequire or PerlModule
directive.

You could also use Apache::SSI as the handler to do the same type of
thing. Many details of how this works in the Eagle book.

One warning: mod_perl *must* be built statically for PerlSSI stuff to
work -- if you try to build it dynamically, the build tool prints a
warning that "PerlSSI disabled in DSO build", or something like that.

HTH,
<Steve>


On Sun, 25 Feb 2001, Surat Singh Bhati wrote:

> Hi,
> 
> I am using lots of exec cgi SSI in my site, all the 
> CGI called using exec are written in perl.
> <!--#exec cgi="standardcgi.cgi"-->
> 
> I want to take advantage of mod_perl for performance,
> but as I know "exec" will run as mod_cgi , not as mod_perl.
> 
> Can I use <!--#include virtual="modperlscript.pl"--> ?
> If above will run, will be run as a sub request.. ? 
> 
> Any other better solution to server the page included mod_perl scripts 
> SSI in it, without running the subrequest/new process? 
> 
> Regards,
> 
> -Surat Singh Bhati
> 
> 
> 
> 
> 
> 

=-=-=-=-=-=-=-=-=-=-  My God!  What have I done?  -=-=-=-=-=-=-=-=-=-=
Steve Reppucci                                       sgr@logsoft.com |
Logical Choice Software                          http://logsoft.com/ |