Why am i getting Call to undefined function Httpful\curl_init() when using httpful.phar
When including the .phar and running the following: $url = "https://api.github.com/users/nategood"; $response = \Httpful\Request::get($url) ->expectsJson() ->withXTrivialHeader('Just as a demo') ->send(); echo "{$response->body->name} joined GitHub on " . date('M jS', strtotime($response->body->created_at)) ."\n";
I get the following error: [22-Oct-2016 13:25:07 UTC] PHP Fatal error: Uncaught Error: Call to undefined function Httpful\curl_init() in phar://D:/Lotus/Domino/data/domino/html/aotBadge/acclaim/httpful.phar/Httpful/Request.php:865 Stack trace: #0 phar://D:/Lotus/Domino/data/domino/html/aotBadge/acclaim/httpful.phar/Httpful/Request.php(200): Httpful\Request->_curlPrep() #1 D:\Lotus\Domino\data\domino\html\aotBadge\acclaim\badge_fetch.php(11): Httpful\Request->send() #2 {main}
thrown in phar://D:/Lotus/Domino/data/domino/html/aotBadge/acclaim/httpful.phar/Httpful/Request.php on line 865
What am I missing?
Interesting. What version of PHP are you using? I see what the issue is but I'm surprised it hasn't been a problem to this point. Maybe there is a PHP setting I am not aware of that affects the global namespace. On Sat, Oct 22, 2016 at 9:28 AM Andy [email protected] wrote:
When including the .phar and running the following: $url = "https://api.github.com/users/nategood"; $response = \Httpful\Request::get($url) ->expectsJson() ->withXTrivialHeader('Just as a demo') ->send(); echo "{$response->body->name} joined GitHub on " . date('M jS', strtotime($response->body->created_at)) ."\n";
I get the following error: [22-Oct-2016 13:25:07 UTC] PHP Fatal error: Uncaught Error: Call to undefined function Httpful\curl_init() in phar://D:/Lotus/Domino/data/domino/html/aotBadge/acclaim/httpful.phar/Httpful/Request.php:865 Stack trace: #0 phar://D:/Lotus/Domino/data/domino/html/aotBadge/acclaim/httpful.phar/Httpful/Request.php(200): Httpful\Request->_curlPrep() #1 https://github.com/nategood/httpful/pull/1 D:\Lotus\Domino\data\domino\html\aotBadge\acclaim\badge_fetch.php(11): Httpful\Request->send() #2 https://github.com/nategood/httpful/issues/2 {main} thrown in phar://D:/Lotus/Domino/data/domino/html/aotBadge/acclaim/httpful.phar/Httpful/Request.php on line 865
What am I missing?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nategood/httpful/issues/244, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJaAwn1X7kwLUiHq8x8hXlJtN3Z_fUCks5q2g9rgaJpZM4Kd2-v .
Hi, You need to activate the curl extension in your php.ini
Yep. That would make sense. On Thu, Nov 17, 2016 at 8:01 PM Damien DALY [email protected] wrote:
Hi, You need to activate the curl extension in your php.ini
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/nategood/httpful/issues/244#issuecomment-261418776, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJaA-RWOjY_mP6M1dAejaRuccuKcaQmks5q_PjRgaJpZM4Kd2-v .