Art. 122-5

Description of how to install and to use the PECL module mod_http.

Sommaire

[modifier] Installation

[modifier] Windows

Environnement :

  • Apache 2.2.4
  • PHP 5.2.2
  • Windows XP Pro SP2

First, download the PECL module from the php website : PECL 5.2.2 Win32 binaries

Then unzipp it and copy the file php_http.dll in your PHP extension folder. Now edit your php.ini file (c:\WINDOWS\php.ini) and activate the module :

extension=php_http.dll

Restart apache and check the installation using phpinfo.

[modifier] Linux

Environnement :

  • Apache 2.0.54
  • PHP 5.0.4
  • Linux Fedora

[modifier] Compilation

We use pear. First we install the package php-devel :

yum install php-devel

We also need aclocal using the automake package

yum install automake

Solution of the error : warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY

we also have to add curl-devel

yum install curl-devel

So now we can install the pecl_http module

pear install pecl_http

that finishs with install ok: pecl_http 1.5.3

[modifier] Installation

We have to activate the module, don't modify the file /etc/php.ini, but add a file pecl_http.ini in /etc/php.d

; Enable pecl_http extension module
extension=http.so

restart Apache

[modifier] Utilisation

La documentation PHP

An example : the JamendoLib module

French
Un peu de musique ?


A propos