note 117004 deleted from http.install by sobak
| From: | sobak@php.net | Date: | Sun, 04 Dec 2016 07:26:16 +0000 |
| Subject: | note 117004 deleted from http.install by sobak | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-208102@lists.php.net to get a copy of this message | ||
Note Submitter: pecl_http_adventure
----
If you are having trouble installing pecl_http 2.x (possibly on Ubuntu 14.04 LTS), pay close
attention to the output from phpize when building + installing with pecl.
You'll need to install the system packages outlined at:
http://devel-m6w6.rhcloud.com/mdref/http/
For instance: zlib1g-dev, libcurl4-openssl-dev and libevent-dev
You'll also need to install raphf and propro (SPL should be installed by default with PHP)
You do not need php-http - this is a PEAR class for HTTP_Request.
The PECL install on Ubuntu 14.04 requires the paths to zlib, libcurl and libevent:
where to find zlib [/usr] :
where to find libcurl [/usr] :
where to find libevent [/usr] :
In my instance, libcurl4-openssl-dev was not installed but the PECL package built successfully:
checking for curl/curl.h... not found
and this resulted in a segfault when checking for the extension after installation using
php
-i :
$ php -i
....
http
HTTP Support => enabled
Extension Version => 2.4.1
Used Library => Compiled => Linked
libz => 1.2.8 => 1.2.8
libcurl => disabled => disabled
libevent => 2.0.21-stable => Segmentation fault (core dumped)
Once libcurl4-openssl-dev was installed and the package reinstalled using pecl install -f
pecl_http, there were no segfaults:
$ php -i
http
HTTP Support => enabled
Extension Version => 2.4.1
Used Library => Compiled => Linked
libz => 1.2.8 => 1.2.8
libcurl => 7.35.0 => 7.35.0
libevent => 2.0.21-stable => 2.0.21-stable
Directive => Local Value => Master Value
http.etag.mode => crc32b => crc32b
Once installed, the class can be found via the 'http' namespace e.g http\Client\Request,
not HTTPRequest.