Answer the question
In order to leave comments, you need to log in
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
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();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question