How to pear install HTTP2 and HTTP_Request2


Posted by Andrew McCombe on Thu Apr 16, 2015

Whilst working on a project recently I’ve found the need to install the HTTP2 package from the pear repository. I couldn’t find any useful notes on how to install HTTP2 via pear so here’s my notes on how to pear install HTTP2.

Firstly, make sure Pear is installed. On an Ubuntu system you can use apt-get to install:

$ sudo apt-get install php-pear

Then update the channels:

$ sudo pear update-channels

Search for HTTP2:

$ sudo pear search HTTP2

Retrieving data...0%
Matched packages, channel pear.php.net:
=======================================
Package Stable/(Latest) Local
HTTP2   1.1.1 (stable)  1.1.1 Miscellaneous HTTP utilities

Finally install HTTP2:

$ pear install HTTP2

downloading HTTP2-1.1.1.tgz ...
Starting to download HTTP2-1.1.1.tgz (13,033 bytes)
.....done: 13,033 bytes
install ok: channel://pear.php.net/HTTP2-1.1.1

Additionally, I needed to install HTTP_Request2:

$ pear install HTTP_Request2

downloading HTTP_Request2-2.2.1.tgz ...
Starting to download HTTP_Request2-2.2.1.tgz (107,339 bytes)
.........................done: 107,339 bytes
downloading Net_URL2-2.1.1.tgz ...
Starting to download Net_URL2-2.1.1.tgz (19,848 bytes)
...done: 19,848 bytes
install ok: channel://pear.php.net/Net_URL2-2.1.1
install ok: channel://pear.php.net/HTTP_Request2-2.2.1