Extern Executions (Perl)

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

 



Hi,

It seems more like a problem in Perl than PHP.. so sorry if this is asked in the wrong list, but I believe there are also Perl gurus among the list members.. ;)

I have a perl script which from it I externally execute a PHP script with some parameters.
When running the perl program throu unix shell, then perl executes the PHP program as expected, and returns its output.
When running the perl program throu Apache (using cgi-bin on a browser), then perl opens the PHP file for reading and doesn't execute the PHP script, and returns the PHP code of the script.


The Perl line trying to execute the PHP script is:

open (PIPE,"./my_prog.php $arg1 $arg2 |");
while (<PIPE>)
  $res=$res.$_;
print "got:\n",$res;

Does anyone have any clue why Perl behaves differently on different enviorments?
OR: does anyone have a suggestion for a stable solution?


-thanks, Eli

--
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