I have installed R on my server and have a problem with Rscript. basically when i use Rscript via terminal its working but the same exact code via php doesnt work.
Rscript file.R > file.csv
shell_exec("Rscript file.R > five.csv");
shell_exec("Rscript file.R 2>&1");
Rscript: command not found
located Rscript directory at /usr/bin/Rscript
so i changed the code to:
shell_exec("/usr/bin/Rscript file.R 2>&1");
sh: usr/bin/Rscript: No such file or directory
made various variations to code thinking either i needed to make sure path to file is correct. tried both absolute and relative paths. nothing worked.
any ideas? please help me. THANKS