We've been asked to support some rather old Perl forms on a new site, as we're using a PHP based CMS we need to include the Perl scripts into our new CMS.
I've tried a bit of shell_exec but that's disabled. Has anyone got any ideas?
We've been asked to support some rather old Perl forms on a new site, as we're using a PHP based CMS we need to include the Perl scripts into our new CMS.
I've tried a bit of shell_exec but that's disabled. Has anyone got any ideas?
There is a Perl extension available for PHP.
An article from the Zend developer zone details it here.
The extension allows you to:
You can obtain it from CVS using this command:
$ cvs -d :pserver:cvs.php.net:/repository co pecl/perl
An example of running a Perl script is listed here:
print "Hello from Perl! "
<?php
print "Hello from PHP! ";
$perl = new Perl();
$perl->require("test1.pl");
print "Bye! ";
?>
See similar question: How can I use Perl libraries from PHP?
If you Perl script is creating the page with the forms that you client is supposed to be able to change, then you are out of luck. You might be able to come up with some PHP page that contains the output of the Perl script, but you'll never be able to feed any changes on that page back into the Perl script.