I installed PHP’s perl extension on debian. Everything installed without any errors. I checked whether PERL is properly installed by doing ‘apt-get install perl’. To be completely sure, I copied the perl.so file in the usr/lib/php5 directory. When I try to use the extension within a php script ($perl = new Perl();),I get a php error that the class cannot be found. Any ideas?
I`m trying to pass variable from PHP file to perl script in code bellow. If someone has an example to post that would be great, btw. everything else works great.
Hello,
I notice that doing a $perl->require() or $perl->eval(), will send the header even if using output buffering. Once that happens, I can no longer set cookies, etc. Has anyone been able to use perl without it sending a header?
8 comments to “Using Perl Code from PHP”
March 28th, 2007 at 6:22 pm
This PECL extension seems really cool, but its for PHP5 only. How can I do this php->perl stuff in php4?
July 4th, 2007 at 5:21 pm
You upgrade to php5. Its been out for 4 years, its time for an upgrade.
September 26th, 2007 at 8:02 pm
I installed PHP’s perl extension on debian. Everything installed without any errors. I checked whether PERL is properly installed by doing ‘apt-get install perl’. To be completely sure, I copied the perl.so file in the usr/lib/php5 directory. When I try to use the extension within a php script ($perl = new Perl();),I get a php error that the class cannot be found. Any ideas?
April 22nd, 2008 at 2:48 pm
add
extention=perl.so to your php.ini file
June 2nd, 2008 at 2:01 pm
$perl = New Perl() points to /usr/bin/perl or what default perl is.
What if I want to use /usr/local/bin/perl?
Do I have to decide this at pecl compile time?
October 25th, 2008 at 10:57 am
I`m trying to pass variable from PHP file to perl script in code bellow. If someone has an example to post that would be great, btw. everything else works great.
January 25th, 2009 at 10:18 pm
Do somebody know how to fix this bug?
http://www.pecl.php.net/bugs/bug.php?id=14644
May 18th, 2009 at 10:36 pm
Hello,
I notice that doing a $perl->require() or $perl->eval(), will send the header even if using output buffering. Once that happens, I can no longer set cookies, etc. Has anyone been able to use perl without it sending a header?
Thanks!