I've installed ImageMagick for PHP using the following command:
sudo apt-get install php5-imagick
But the version installed (namely ImageMagick 6.6.9-7 2012-08-17 Q16) is not the latest version (currently 6.8.6) and it has some bugs with prevent a PHP script to run.
So... how to upgrade to the latest version?
Idiot-proof step by step instructions would do the trick.