After scouring the web to find a viable solution for ImageMagick on IIS, I was able to piece together various pieces of information and reach a solution.
These steps are for PHP v5.6, ImageMagick PHP Library 3.2 and ImageMagick Windows Application 6.8+.|
Note that resources are needed from both the Windows Application and the PHP Extension Library (PECL).
Resource | Link | |
1 | ImageMagick 3.1.2 5.6 Non Thread Safe (NTS) x86 | http://windows.php.net/downloads/pecl/releases/imagick/3.1.2/php_imagick-3.1.2-5.6-nts-vc11-x86.zip |
2 | ImageMagick Windows Application 6.8+ | http://www.imagemagick.org/download/binaries/ImageMagick-6.9.2-7-Q16-x86-dll.exe |
Follow these instructions to install ImageMagick on Azure Web Apps.
Download/Install
1. Download the resources above.
2. Install ImageMagick for Windows. Uncompress ImageMagick 3.1.2 NTS x86.
DLL’s
3. Create directories on your web server using FTP or SCM (websitename.SCM.azurewebsites.net)
a. Create d:\home\site\coders6.9.2 (will contain coder DLLs from the Windows Application)
b. Create d:\home\site\imagick3.1.2 (will contain DLLs from PHP Imagick Library)
4. Copy DLLs
a. Copy DLLs from C:\Program Files (x86)\ImageMagick-6.9.2-Q16 to your Azure Web App location d:\home\site\imagick3.1.2\
b. Copy DLLs from C:\Program Files (x86)\ImageMagick-6.9.2-Q16\modules\coders to d:\home\site\coders6.9.2\
c. Copy DLLs from php_imagick-3.1.2-5.6-nts-vc11-x86.zip to d:\home\site\imagick3.1.2\
Environment Configuration
5. Copy d:\local\PHP\php.ini to d:\home\site\php56.ini
extension_dir="D:\local\Config\PHP-5.6.10\"
extension=d:\home\site\imagick3.1.2\php_imagick.dll
6. Within d:\home\site, create applicationHost.xdt with the contents below:
<?xml version="1.0"?> |
7. Restart the server and test the following code:
<?php |