Page 1 of 1

PHP calling PERL functions

Posted: Mon May 04, 2009 3:10 am
by sonuiqbal
Hello All,
I am a newbie to perl. Please help :( .
I have a php script which in turn calls a perl function using the following method.
$perl = new Perl();
$perl->require('my perl code');
$perl->function_name();

The corresponding perl function communicates with a remote machine and displays the output send by it using sockets. The perl script works fine when executed separately and displays an xml output sent back by the remote machine (server side) . When it is integrated with php the output is not valid and just a string from the entire xml, is displayed. My perl script consists of different functions out of which I call functins as per requirement from php.
I have edited the php.ini file and changed the script execution time to -1.

-Is there any specific way for calling the perl functions from php? Am I going right?
- Does php interferes the routine once the control goes to the perl code?

I would really appreciate your help. Please feel free to ask any questions if you need any clarifications.

Thanks
-Sonu