A
A
asosonko42016-02-11 13:27:25
PHP
asosonko4, 2016-02-11 13:27:25

Why might PhantomJS not work on hosting?

Good afternoon, please tell me how to solve the following problem: "I installed PhantomJS on MAMP, did everything I needed - there were no problems, everything works like clockwork, but when I import the source folder to the hosting after importing, the following error crashes"

Fatal error: Uncaught exception 'JonnyW\PhantomJs\Exception\ProcedureFailedException' with message 'Error when executing PhantomJs procedure "default" - File does not exist or is not executable: bin/phantomjs' in /home/gorecky/hotshoppingdeals.net/omlife /vendor/jonnyw/php-phantomjs/src/JonnyW/PhantomJs/Procedure/Procedure.php:132 Stack trace: #0 /home/gorecky/hotshoppingdeals.net/omlife/vendor/jonnyw/php-phantomjs/src/JonnyW/ PhantomJs/Client.php(170): JonnyW\PhantomJs\Procedure\Procedure->run(Object(JonnyW\PhantomJs\Client), Object(JonnyW\PhantomJs\Message\Request), Object(JonnyW\PhantomJs\Message\Response) ) #1 /home/gorecky/hotshoppingdeals.net/omlife/index.php(81): JonnyW\PhantomJs\Client->send(Object(JonnyW\PhantomJs\Message\Request),Object(JonnyW\PhantomJs\Message\Response)) #2 {main} thrown in /home/gorecky/hotshoppingdeals.net/omlife/vendor/jonnyw/php-phantomjs/src/JonnyW/PhantomJs/Procedure/Procedure.php on line 132


My code in index.php file looks like this:

require __DIR__ . '/vendor/autoload.php';

  $client = \JonnyW\PhantomJs\Client::getInstance();
  $request = $client->getMessageFactory()->createRequest($link, 'GET');
  $response = $client->getMessageFactory()->createResponse();
  $client->send($request, $response); 
  $html = $response->getContent();


Please tell me how to solve this problem! Huge thank you man!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Burov, 2016-02-11
@BuriK666

"File does not exist or is not executable"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question