in reply to Talking to PHP from Perl

From your code it looks like this is written to work in mod_perl1. I don't see any problems with your approach (it's quite nifty), but I thought I would throw out a second way of handling this type of problem with the new filter support in apache2 and mod_perl2.

Both PHP and mod_perl can act as a filter. In your case, you should be able to leave the PHP page unaltered, and filter it's output through a custom mod_perl filter. The filter gets as input the generated PHP page, and can parse out any info it needs and spit out a completely different page.

But since you have what looks to be a working system, it probably makes sense to stick with that.

- Cees

Replies are listed 'Best First'.
Re: Re: Talking to PHP from Perl
by petdance (Parson) on May 30, 2004 at 19:04 UTC
    We'll put together a dummy page that generates no output, but just sets note values. We've got a fair amount of business logic in PHP classes that we just don't have the time to port over to Perl.

    If we didn't have this bridge, we'd have to do the entire project in PHP, instead of being able to chip away at it and do some Perl for it.

    xoxo,
    Andy