Re: integrating perl and PHP problem

From: Date: Wed, 08 Apr 2009 14:47:51 +0000
Subject: Re: integrating perl and PHP problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-291216@lists.php.net to get a copy of this message
Moses wrote: > Hi Everyone, > > I have a perl program which I would like to display its > results in PHP. I have read PHP book and the solution > is to convert the perl program which is not easy. I have > tried a simple example but it is not working. The perl script > is > > #! /usr/bin/perl -w > print "hello world" > > and the Php script is > > <?php > $result = exec("/var/www/hello.pl",$dirout); > foreach($dirout as $line) > { > echo "$line\n"; > } > ?> > > Thanks. > I don't think PHP / Apache have the rights to execute a perl script like this. Either give hello.pl execute rights. Or change the line in exec to "/usr/bin/perl /var/www/hello.pl"

« previous php.general (#291216) next »