CentOS6、PHP5.3.3の環境でpecl_httpをインストールしようとしたところ、こんなメッセージが出ました。
| 1 2 3 4 5 6 7 | # pecl install pecl_http pecl/pecl_http requires PHP (version >= 7.0.0), installed version is 5.3.3 pecl/raphf requires PHP (version >= 7.0.0), installed version is 5.3.3 pecl/propro requires PHP (version >= 7.0.0), installed version is 5.3.3 No valid packages found install failed | 
最新バージョンのインストールにはPHP7.0.0以上が必要なようです。
しかしいくつものサービスが稼働中のサーバーでしたので
PHPのバージョンを上げるにはリスクがありました。
調べたところ、最新ではない古いバージョンのpecl_httpなら
インストールできるらしいので試してみました。
| 1 | # pecl install pecl_http-1.7.6 | 
すると先程のメッセージは出ず、処理が進んでいくので
インストールできたー
と思ったら、次のようなメッセージで止まりました。
| 1 2 | configure: error: could not find curl/curl.h ERROR: `/var/tmp/pecl_http/configure --with-http-curl-requests --with-http-zlib-compression --with-http-magic-mime=no --with-http-shared-deps' failed | 
curlを入れろということらしいので
curlを入れます。
| 1 | yum install curl-devel | 
そして再び
| 1 | # pecl install pecl_http-1.7.6 | 
これでインストールできました。
あとは /etc/php.ini に下記を追加します。
| 1 | extension=http.so | 
これでwebサーバーを再起動すればOKです。
