How to run a perl script from php with variables -
i trying run perl script php requires parameters passed perl script run correctly. following correct usage of perl script linux terminal:
/home/user/test.pl -a alpha -b beta
or
/home/user/test.pl -a alpha
i have execute permissions on script , can run without parameters , correct usage script displayed browser.
below php code works displaying usage browser:
$result = shell_exec('/home/user/test.pl'); echo $result; and following problem code can not life of me figure out:
$test = $_post['test']; $result = shell_exec('/home/user/test.pl -a'.' '.$test); echo $result; can tell me missing make work correctly?
thank help.
my issue resided within perl script , specific line trying output log file apache user did not have access to. calling script correctly whole time once able server side logs (granted system admin) saw issue buried within perl script , not in php.
Comments
Post a Comment