perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael A. Capone" <mcap...@cablewholesale.com>
Subject Re: mod_perl handler and PHP
Date Tue, 17 Mar 2009 16:33:48 GMT
Perhaps something like this might work?

in index.php:

   $phpcode = 
file_get_contents("http://127.0.0.1/path/to/perl/module/that/outputs/php/code.pl");
   eval($phpcode);

Obviously, you'd have to take care with the php syntax that was output 
from code.pl, but that might give you the functionality you're looking 
for.  We've done similar things where perl was better suited to a 
particular task on a page that otherwise wanted PHP.

Daniel.Angileri@imperia.net wrote:
>
> Hello list,
>
> is it possible to parse the output of mod_perl handler through PHP?
>
> I tried like this:
>
> ### httpd.conf ###
> PHPIniDir "C:/PHP/"
> LoadModule php5_module "C:/PHP/php5apache2_2.dll"
>
> ### vhost.conf ###
>     <Location /ls/app/demo>
>       SetHandler modperl
>       PerlHandler My::Handler
>       SetOutputFilter PHP
>     </Location>
>
>
> When I trie to call up /ls/app/demo/index.php the Apache serves me the 
> file for downloading.
>
> Apache 2.2.6 (Win32)
> PHP 5.2.9
> mod_perl 2.0.3
> Active Perl v. 5.8.8
>
>
> Has anyone already set up this szenario?
>
>
> Regards
> Daniel 

Mime
View raw message