$response->getStatus() return int(0)
Hey, I use this package with laravel 4.2 on windows 7 os, my code is: ` $client = JonnyW\PhantomJs\Client::getInstance(); $client->isLazy(); $client->getEngine()->setPath(base_path(). "/vendor/bin/phantomjs"); $request = $client->getMessageFactory() ->createCaptureRequest($some_url, GET'); $request->setTimeout(5000); $width = 1024; $height = 768; $request->setViewportSize($width, $height);
$request->setCaptureDimensions($width, $height, 0, 0);
$response = $client->getMessageFactory()->createResponse();
$client->send($request, $response); `
$response->getStatus() return int(0) and it save black picture !
any help?
Do you try debugging?
$client->getEngine()->debug(true);
$client->send($request, $response);
echo $client->getLog();
From the phantomjs docs about installing on windows:
Note: For this static build, the binary is self-contained with no external dependency. It will run on a fresh install of Windows Vista or later versions. There is no requirement to install Qt, WebKit, or any other libraries.
@RubtsovAV I'll try it ! thx!
@RubtsovAV Tried logging and getting : QXcbConnection: Could not connect to display PhantomJS has crashed. Please read the bug reporting guide at and file a bug report. Aborted (core dumped) I am using ubuntu 16.04. , Laravel 5.5 And I want to be able to run this as headless...