Chapter 2. Installation

If you compile libpurple from scratch, you could use the following configure options:

user@host~# ./configure --enable-gnutls=yes --enable-nss=no --disable-gtkui --disable-consoleui --disable-screensaver --disable-sm --without-x --prefix=/usr

This will compile only libpurple. Otherwise, if you have already pidgin installed, libpurple is normally present in the /usr/lib or /usr/local/lib.

While within Phurple dir, invoke:

user@host~# phpize && ./configure --with-phurple && make && make install

Since the extension is installed, you can simply add a line in your php.ini with which it'll be loaded by default. An other way would be to use the dl() php function at the top of your script

Example 2.1. 

	if(!extension_loaded('phurple')) {
		dl('phurple.' . PHP_SHLIB_SUFFIX);

Windows builds are available from Besides the php_phurple.dll you'll need to pull the appropriate libpurple build+deps and put it somewhere on the path. Don't try to use the libpurple binaries from the Pidgin distribution, compiled with gcc they're not compatible with the provided phurple builds.