Re: integrating perl and PHP problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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"

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux