I am attempting to call a bash script from PHP. When I run this bash script on my text file from the command line, I get the desired output. However, through PHP, it simply outputs nothing.
The following is my PHP code.
$output = shell_exec("path/to/script.sh tmp/file.txt");
echo $output;
Where path/to/script is, as it sounds, the path to the bash script, and tmp/file.txt is the argument for the script. The output of this is blank, yet when I run the bash script with the same input in the command line, it executes properly. Why is this?