Hi,
I want to send parameters from php to a perl script. The strange thing is that I can execute the perl script from the command line exactly as it is typed into the exec command of the php file and it works!
Here's my code:
PHP file:
======
<?php
print "Hello from PHP!<br>";
exec ('perl /<path to perl script>/test_perl_params.pl myparam=1',$result);
print $result[0];
print "<br>";
print "Bye! ";
?>
Perl File
======
#!/usr/bin/perl
use CGI;
$cgi = new CGI;
my $myparam=$cgi->param('myparam');
print "Hello from Perl[",$myparam,"]\n";
When I call the php script, the myparam is not populated in the print statement.
Any help would be much appreciated.
Thanks,
Don