Here in my php file, I'm trying to execute a shell command. I was able to run the command variable value in the terminal just fine. But somehow shell_exec doesn't do it for me.
$command = 'jpegoptim '.$imgpath;
shell_exec($command);
Look like 'git status' won't even work in here
$output = shell_exec('git status');
Update: finally getting an error
sh: jpegoptim: command not found