Ubuntu 10.04 & PHP 5.3: Installing pecl_http

To install the pecl_http PHP extension on Ubuntu 10.04 follow the instructions below:

  1. Install the required packages:
    # sudo apt-get install php-pear php5-dev libcurl4-openssl-dev
  2. Install pecl_http:
    # sudo pecl install pecl_http
  3. Create file /etc/php5/conf.d/http.ini with the following content:
    extension=http.so
  4. Restart Apache2:
    # sudo /etc/init.d/apache2 restart

After restarting the Apache2 web server a “http” section should be included in the phpinfo() output.