4

Anyone sucessfully used jonnyw's "php phantomjs" with laravel, in a ubuntu envirement?

I do not know if I am doing anything wrong, but I am questioning if it would be possible that it is not possible to use it with laravel in linux...

I get all the time :

"Error when executing PhantomJs procedure "default" - File does not exist or is not executable: bin/phantomjs"

But I tried a lot of ways and many ways, but still didn't make it work...(I am "almost" "sure", that the file is in the right place and the path is right also ), and the bin folder is 777 in permissions... :P Thanks in advance.

Zakaria Acharki
  • 66,747
  • 15
  • 75
  • 101
amijus
  • 49
  • 6

1 Answers1

4

Yep, but it's a pain.

Most of the time it's because you have to use the full path to the phantomjs executable.

Also, make sure phantomjs is properly installed on your server too, like, does it work if you just run the phantomjs command in a terminal?

Jeremy
  • 351
  • 1
  • 3
  • Thanks Jeremy. Yes, already tried with full paths, but now, that I know that it is possible to work, I will insist a little more, with the full path in mind... Thanks – amijus Jun 10 '15 at 20:19
  • 1
    Thank U very much. I did it. I added $client->setPhantomJs('/path/to/phantomjs') and $client->setBinDir('/path/to/bin/dir');, using in fact the full path... and worked... Thank you very much for your help – amijus Jun 10 '15 at 23:36