I am trying to run a .sh file that will import a excel file to my database. Both files are in same directory inside the public folder. For some reason the exec command isn\'
All of these answers are outdated now, instead use (Symfony 4.2 or higher):
$process = Process::fromShellCommandline('/deploy.sh');
Or
$process = new Process(['/deploy.sh']);
https://symfony.com/doc/current/components/process.html