How about using php in cgi mode and using `php scriptname` from within
perl to capture the output?  Not the best performance-wise, but it would
do what you want, I think.

Jim

--
James Helm - Solaris System Administrator   [EMAIL PROTECTED]
WNS National Operations - Core Services     [EMAIL PROTECTED]
AT&T Wireless Services Inc.                 (425) 288-4395 (Desk) 
3555 Monte Villa Pkwy, Bothell, WA  98021   (206) 618-0438 (Cell)  

> -----Original Message-----
> From: Ryan Thompson [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, May 28, 2002 8:48 PM
> To: [EMAIL PROTECTED]
> Subject: Invoke PHP scripts?
> 
> 
> 
> Hi there,
> 
> Apologies if this has been asked 2^32 times, but I couldn't 
> seem to find anything in the archives or on the web which 
> would solve my problem.
> 
> I'm developing a large-ish web site in which I would like to 
> use a combination of mod_perl (90%) and PHP (10%). I have run 
> into a roadblock trying to include the output of a PHP script 
> from a mod_perl script.
> 
> This would do fine:
> 
>   my $r = Apache->request();
>   return $r->lookup_uri($url)->run;
> 
> But (and I am familiar with why this happens) run() dumps the 
> results to STDOUT, so the final HTML does not come through in 
> the correct order.
> 
> I tried to use Apache::SSI in this manner:
> 
>   my $r = Apache->request();
>   my $ssi = Apache::SSI->new($contents, $r);
>   return $ssi->get_output();
> 
> (Where $contents is the raw PHP source), but, possibly 
> because of some Content-type mixup, the output is returned as 
> expected (i.e., not dumped to stdout), but the PHP source is 
> not interpreted.
> 
> So, in short, I need another way to invoke a PHP script from 
> my mod_perl application... exactly what <!--#include 
> virtual="..." --> would do.
> 
> Help..? :-)
> 
> - Ryan
> 
> -- 
>   Ryan Thompson <[EMAIL PROTECTED]>
> 
>   SaskNow Technologies - http://www.sasknow.com
>   901 1st Avenue North - Saskatoon, SK - S7K 1Y4
> 
>         Tel: 306-664-3600   Fax: 306-664-3630   Saskatoon
>   Toll-Free: 877-727-5669     (877-SASKNOW)     North America
> 

Reply via email to