imagick is a native php-extension that provides a wrapper to the ImageMagick / GraphicsMagick library. You need the ImageMagick libraries from www.imagemagick.org or GraphicsMagick libraries from www.graphicsmagick.org to get it running._ ImageMagick 6 support is EXPERIMENTAL. _
Note: I am aware of another php module implementing Imagemagick functions (MagickWand for PHP from imagemagick developers) but for my project this was not a solution and I just needed a functional version of imagick module running on top of Debian Etch (with apache 2.2.3 and php 5.2).
The reason for my previous post “Install ImageMagick 5.5.7 on Debian” was to prepare the installation of the imagick php module, so once we have installed ImageMagick 5 from source we can proceed with the php module installation. The actual installation is very simple and anyone that has previously installed php extensions will see no difference (the only special thing was to build it against the ImageMagick 5 we installed previously).
Download the source of imagick from pecl:
(the latest version is 0.9.11 and this was released more than 2 years ago).
tar -xvvzf imagick-0.9.11.tgz
Compile it as any php extension (the only special thing is to specify the location we installed ImageMagick on the configure):
cd imagick-0.9.11 phpize ./configure <strong>--with-imagick=/usr/local</strong> make make install
Optionally we can strip the resulted binary (adjust the location of the installed module if needed – based on the php version you are using):
The only thing left is to enable the imagick php module. For this just add:
to your php.ini file.
Once you have reloaded the web service (for ex: /etc/init.d/apache2 reload), you can check that the newly installed php module appears (for ex. using a phpinfo call). This will appear like:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
As a comparison using the same imagick module but compiled against imagemagick 6 (or even simpler using the imagick module available on debian: apt-get install php5-imagick) we see an phpinfo output like:
1 2 3 4 5 6 7 8