Running Perl from PHP via PHP virtual function

Stephen Collyer scollyer at netspinner.co.uk
Wed Jan 4 18:34:19 GMT 2006


Andy Lester wrote:
> On Wed, Jan 04, 2006 at 05:20:41PM +0000, Stephen Collyer (scollyer at netspinner.co.uk) wrote:
> 
>>The idea is that I'd have a trivial Perl script that runs the
>>access/auth control code (e.g. gateway.pl), and I'd funnel all
>>requests to gateway.pl via a trivial PHP script that runs
>>something like:
>>
>>virtual("/some/dir/gateway.pl");
>>virtual("/the/real/target/of/the/request");
> 
> 
> No, that's fine.  We do that in both directions, with PHP calling Perl
> handlers, and Perl handlers calling PHP.  You can even pass data around
> in the Apache notes.

Andy

Thanks for that. A few questions though:

1. When you say "PHP calling Perl handlers", are you explicitly
referring to a mod_perl handler, or am I reading too much into it ?

I'm intending to use this approach precisely when there's no
mod_perl support available, so I'm keen to know if there's any
specific reason that you use the term "handler".

2. PHP -> Perl is done via virtual, I guess, but how do you do
Perl -> PHP ?

3. Could you expand on the comment re: Apache notes - how
do you get data into a note from PHP ? I'm no PHP expert
so if this is covered in the PHP docs, feel free to refer
me there.

-- 
Regards

Stephen Collyer
Netspinner Ltd


More information about the london.pm mailing list