I am working on a laravel project where I am trying to use php wrapper of phantom js made by jonnyw. I have done everything written in the docs.
I have downloaded the 32 bit executable file and set the path in my code, but it still gives me the following error: sh: 1: /usr/local/bin/: Permission denied
My code looks like this
$client = PhantomJs::getInstance();
$client->getEngine()->setPath('/usr/local/bin/');
I have read some related issues already.
I am using laravel 5.4 and 4.0 version of jonnnnyw/php-phantomjs.
After exploring the internet and hours of deep digging I have been able to identify the solution.
Actually the solution is two fold:
So in my case the correct path is
Where phantomjs is the executable file itself not the folder/directory containing it.
I hope it will be helpful for people like me.