I was thinking about the same thing awhile back.  It was interesting to me that
lots of neat applications are PHP based.  I would like to be able to take the
processed PHP page and include it inside of my mod_perl page.  I was thinking
there are several ways I could handle.  I can have a seperate directory that
process the php files and just use the LWP::Simple to get the page as a
processed string.  Then replace any content with =~ s/blah/cool/ inside of the
mod_perl processed page.  I do this with some cgi programs that I use
currently.  It works ok, but the overhead must be tremendous.  Anybody else done
anything similar?

Aaron Johnson

Page is called ez_archive.html, there is a lot more going on then this simple
post, but this is the crux of what I am saying.
code sample (Apache::ASP based):

<%  use LWP::Simple;
my $get_string;
foreach my $key (keys %{$Request->QueryString}) {
        $get_string .= $key;
        # this should be concated with a & in regular cases, but this cgi
program
        # only has one element connected by ':'
        # i.e. $get_string .= "&$key";
}


my $content = get("http://www.mydomain.com/cgi-bin/ezmlm-cgi?$get_string");

$content =~ s#cgi-bin/ezmlm-cgi#$Session->{Instance}/email/ez_archive.html#g;
$content =~ s#ezmlm-cgi#ez_archive.html#g;
print $content;

%>

Rob Tanner wrote:

> --On 07/16/00 16:11:07 -0400 Sam Carleton <[EMAIL PROTECTED]> wrote:
>
> > I would like perl to process a php page before or after the php
> > interpreter get's it hands on the file.  I am trying to add a navbar to
> > the PHP code.  How would I go about doing that?
> >
> > Sam
>
> The simple answer is wait for Apache 2.x, but since that's just barely
> alpha now, that's a looong [sic] while away.
>
> The issue in Apache 1.x is that you can use only one handler in any
> particular phase to process you're request.  Thus, php or mod_perl (or cgi,
> depending on how you meant to invoke perl).
>
> But the real question is why?  I have never done a navbar on a page (most
> of my web work is server app development, not pages), si I may be making
> some wrong assumptions here.  If you are creating the page with a cgi or a
> mod-perl app, I would think you would be able to do the whole thing without
> ever using PHP.
>
> But, if what you are really doing is displaying a page with server-side
> components, PHP is a much better chice by far than cgi or mod-perl.  What
> are you trying to do that php won't do for you?
>
> -- Rob
>
>        _ _ _ _           _    _ _ _ _ _
>       /\_\_\_\_\        /\_\ /\_\_\_\_\_\
>      /\/_/_/_/_/       /\/_/ \/_/_/_/_/_/  QUIDQUID LATINE DICTUM SIT,
>     /\/_/__\/_/ __    /\/_/    /\/_/          PROFUNDUM VIDITUR
>    /\/_/_/_/_/ /\_\  /\/_/    /\/_/
>   /\/_/ \/_/  /\/_/_/\/_/    /\/_/         (Whatever is said in Latin
>   \/_/  \/_/  \/_/_/_/_/     \/_/              appears profound)
>
>   Rob Tanner
>   McMinnville, Oregon
>   [EMAIL PROTECTED]

Reply via email to