Below are the steps to install it on CentOS:
- Install PHP Pear if not installed yet:
yum install php-pear
- Install GCC if not installed yet:
yum install gcc
- Install cURL if not installed yet:
yum install curl-devel
Otherwise you'll get the following message while installing PECL_HTTP:
configure: error: could not find curl/curl.h - Start the main installation:
/usr/bin/pecl install pecl_http
You can use default values when answering installation questions - Add the following line to /etc/php.ini file:
extension=http.so
- Restart your apache server so the extension can be loaded:
httpd -k restart
4 comments:
Thanks for this post Filip. I had to install php-devel (yum install php-devel) otherwise phpize is not present to build http.so.
Unfortunately, after restarting my env, the following error is raised :
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/http.so' - /usr/lib/php/modules/http.so: undefined symbol: Z_ADDREF_P in Unknown on line 0
Great help ! Thanks
I also had to install php-devel, but then I tried to install I got zlib error and then I installed zlib: yum install zlib-devel
thanks Filip
Post a Comment