php can't execute a perl script via exec -
i'm trying execute perl script php. perl script reading webpage , producing xml file data. if exec via shell works expected when i'm trying automate whole thing via php nothing works.
i've tried this:
exec("perl /absolute/path/to/perl/script/parser.pl", $output, $result);
when echo $result
variable displays 2
. i've switched php safe_mode on , off several times nothing changed. tried set safe_mode_exec_dir
without positive results.
when exec simple ls
exec("ls", $output, $result);
everything goes well, list of files , $result
0
.
the perl script has chmod 777 not problem of permission. folder has 777.
i'm sure issue server i'm not able find out what.
any appreciated.
thanks
you need specify full path perl executable.
try typing which perl
see full path is, place full path in exec
call.
Comments
Post a Comment