Installing Imagick on Ubuntu 12

To install Imagick, you would normally do this via PECL.

sudo pecl install imagick

However, when trying this on Ubuntu 12.04 LTS, you may get an error similar to the following.

checking ImageMagick MagickWand API configuration program...
configure: error: not found. Please provide a path to MagickWand-config or Wand-config program

You can resolve this by installing a few extra packages.

sudo apt-get install libmagickwand-dev libmagickcore-dev

Now try re-running the original command and it should be successful.

Installing PECL YAML on Mac OSX Lion

If you are trying to install YAML via PECL on Lion, you may get an error such as the following.

configure: error: Please install libyaml
ERROR: `/private/tmp/pear/install/yaml/configure --with-yaml' failed

Some solutions on the internet suggest installing it via a package manager.

rvm pkg install libyaml

However, although this process will claim to work, when you come to run the command again, it will fail at the same point. Instead, you need to download libyaml, which you can do here, then extract it, cd into the directory and run the following commands.

make install

You don’t need to sudo. You should now be able to run the install command again.

sudo pecl install --ignore-errors yaml

This time it should be successful.

Conflict error on PECL YAML

If you are trying to install PECL YAML on Mac OS X Lion, you may find you get a conflict with an error message similar to the following.

WARNING: conflicting files found:
yaml/LICENSE (

This error is documented on GitHub and as it is not critical, can be overcome by turning off errors.

pecl install --ignore-errors yaml

On running that command, it should no longer stop at that point.

Installing Mongo PHP driver on CentOS 6 cPanel

Once again, the PECL installer. In order to get the Mongo driver for PHP working, you need to install it manually.

mkdir mongo
cd mongo
unzip master
cd mongodb-mongo-php-driver-df8b217
make install

Add the extension to your php.ini file.

Restart Apache, and Mongo should appear inf your phpinfo() output.

Install APD on CentOS 5

Here is how to install APD (Advanced PHP Debugger) on CentOS 5. Lets start by creating a directory for it to log files to.

cd /tmp
mkdir apd
chown apache:apache apd

We need to remove ioncube, or it will cause errors.

rpm -e php-ioncube-loader

Now we can install APD, via PECL.

pecl install apd

Add the following to php.ini.


My PHP binary was in a different location, so I had to alter the script too.

cd /usr/bin/
vim pprofp

Change /usr/local/bin to /usr/bin and save the file.

You also need to ensure PEAR is in your include path (/usr/share/pear) for the script to work.

Compiling APD on PHP 5.3

If you try and compile APD on PHP 5.3, you may get an error similar to the following.

error: 'struct _zend_compiler_globals' has no member named 'extended_info'make: *** [php_apd.lo] Error 1

This can be solved by modifying a few of the APD files. To do this, you need to download the APD archive file and uncompress it.

Then make the changes as detailed on the PHP bug tracker. Once this is done, it should install as normal.

sudo make install

APD should now be installed.