Install PECL_HTTP on CentOS

pecl_http is required for the php function: http_build_url()
in order to use this function, we need to install the package manually,
below is the steps that required to install on your centOS server.

1. Install PHP Pear if not installed yet:
yum install php-pear

2. Install GCC if not installed yet:
yum install gcc

3. Install cURL if not installed yet:
yum install curl-devel

4. Install following library if not installed yet:
yum install php-devel
yum install zlib-devel
yum install pcre-devel

5. Start the main installation (use default value for answering installation)
As version 1.* is largely different with version 2.*, so we suggest install 1.7.6
/usr/bin/pecl install pecl_http-1.7.6

6. Add the following line to /etc/php.ini file
extension=http.so

7. restart apache server so the extension can be loaded
service httpd restart

——

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *