-
Notifications
You must be signed in to change notification settings - Fork 434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basic Script not running: Use failing 500 error #156
Comments
The "basic example" referenced above is as follows: getMessageFactory()->createRequest('http://jonnyw.me', 'GET'); /** * @see JonnyW\PhantomJs\Http\Response **/ $response = $client->getMessageFactory()->createResponse(); // Send the request $client->send($request, $response); if($response->getStatus() === 200) { // Dump the requested page content echo $response->getContent(); } |
How did you create your client? Maybe you can get additional info by having a look at the log by |
Yes, I can confirm the basic example is not working, php process is stuck forever.
It gets stuck here |
In the end I hired someone on Freelance to configure it. Too many moving parts for my knowledge level in the end and too much time invested. Thank you all for your attempts to help me. Beautiful once it's working.
…Sent from my iPhone
On Feb 11, 2017, at 9:02 AM, Nemanja Mitic ***@***.***> wrote:
Yes, I can confirm the basic example is not working, php process is stuck forever.
public static function render_pic(){ $client = Client::getInstance(); $client->getEngine()->setPath(base_path().'/bin/phantomjs.exe'); $request = $client->getMessageFactory()->createCaptureRequest('http://jonnyw.me'); $response = $client->getMessageFactory()->createResponse(); $file = storage_path('app/pic.png'); $request->setOutputFile($file); $client->send($request, $response); }
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Post the solution. |
I don't know what the solution was in the end inasmuch as I didn't solve it myself. I imaged my AWS/EC2 instance and will just clone it for future projects to avoid the pain. Idea: There might actually be a market for pre-configured AWS templates with everything already in place, but that wouldn't be from me. |
I'm not consulting you without having spent a day on this trying every combination I could think of.
I've installed and reinstalled using the jakoch loader without error.
All the directories seem in place in the vendor and bin directories.
The client file exists.
I can run PhantomJS scripts from the command line in PUTTY successfully.
PHP is up and running on my AWS instance, other programs in PHP run fine.
However, when I run your basic example below I get a 500 error consistently. There is no other error output.
It would appear that I have a configuration issue that is preventing the Client instance from being created.
Your help is greatly appreciated.
The text was updated successfully, but these errors were encountered: