I am using Symfony Process component.
I have installed this.
resolution command works just fine in my terminal. However I am not able to use it with Process()
CODE
$process = new Process('resolution');
$process->run();
OUTPUT
The command "resolution" failed.
Exit Code: 127(Command not found)
I tried to echo the$PATH variable.
CODE
$process = new Process('echo $PATH');
OUTPUT
/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:.
The resolution command is stored in /usr/local/bin , so it should work i believe.
All the solutions on the internet points towards checking the $PATH which does not seem like an issue.
Even if I write entire path of the command, it wont work with Process component. It works in normal terminal just fine
CODE
$process = new Process('/usr/local/bin/resolution');
$process->run();
OUTPUT
The command "resolution" failed.
Exit Code: 127(Command not found)
I have tested my code with different laravel versions as well (5.4 and 8). Facing the same issue