Fatal error: Class 'HttpResponse' not found even after pecl_http loaded in php.ini
I have installed and loaded PECL http extension.
I have added these lines in php.ini:
And I see the following being added in the output of
HTTP Support enabled, Extension Version 2.0.4
libz 1.2.5 1.2.5
libcurl 7.24.0 7.24.0
libevent disabled disabled
But when I try to use the class HttpResponse I am getting the error:
Fatal error: Class 'HttpResponse' not found in RequestHandler.php on line 21
Can anyone please guide to what I have missed.
I think it may be a case of HttpRequest being only in PECL HTTP v1, but not in v2 (which is what you have installed)? At least I don't see it mentioned in the V2 documentation, but the documentation on php.net appears to be for V1.
Thanks for looking into it NogDog.
I also tries using pecl_pecl methods like http_send_status(), http_send_content_type(), and http_send_data() but keep getting the error:
PHP Fatal error: Call to undefined function http_send_status()
I have ensured that the http.so and related dependencies are in the correct folder and executable and are loaded in php.ini
I am at my wits end and I have a feeling that I am missing something very obvious.
I might try installing a 1.x version of PECL_HTTP and see if that cleans up your issues.
PS: Actually, I'd probably just use the cURL extension, instead -- but that's mainly because it's what I'm used to.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread