Prerequisites:

IIS 8.5 Installed

PHP 7.0.X ( 64 Bit) installed to C:\Program Files\PHP via WPI.

O.S :-  Windows Server 2012 / R2

We are about to  enable PHP ImageMagick extension with IIS

ImageMagick is free Open source software for displaying, editing image files in an easier way. It supports more than 200 image formats.

Step 1. Download ImageMagick

Go to http://imagemagick.org/script/binary-releases.php#windows and download ImageMagic exe file.

Step2. Installing of ImageMagick exe

Run the setup file (ImageMagick-6.9.3-7-Q16-x64-dll.exe ) .

Click I accept the agreement button & Click Next.

jo1

 

In the next window, click next and move on. You will be asked about the installation location.

 

jo2

It is recommend to change the default path ( C:\Program Files\ImageMagic x.x.x\ ) to any other folder in C drive. Otherwise it may not work properly.

Here I have created a folder call ‘IM’  in C drive &  is going to install ImageMagick into that folder.  Click Next after selecting the path.

Do not change the Options in the next window ( Select Additional Tasks). Leave it as default & click Next,

 

3

 

Click install in the next page and finish the installation.

Step 3 :- Adding proper DLL files into PHP extension folder.

Go to https://pecl.php.net/package/imagick and Download the proper DLL files forPHP.

From PHP 7.0.0, it supports 64-bit architecture. To find if your PHP is 64- bit or not, open PHP info window and search for Architecture.

Also it will be Thread safe OR Non-Thread safe. We can use phpinfo for this one too. Check for thread safety in phpinfo window, If thread safety is disabled then your PHP is Non-Thread safe.

Once you determine the correct PHP Type, download the appropriate dll files from the above mentioned link. Copy and paste it to PHP extension folder. ( In default – C:\Programfiles OR Program Files (x86) \PHP\v7.0\ext )

Once completed, restart your web server.  

After restarting, open IIS manager and look for PHP Manager in it. Double click on PHP Manager and open it. Then in right pan you can see a new window called PHP Setup.

If you are opening  PHP manager for the first time, then you will see a message. ( red circle in the following image )  . Click on that and enable all.

4

 

Then click on  ‘Enable OR Disable Extension’ tab and find for php_imagick.dll . Click on it then click Enable button in the right side panel to enable  ImageMagic Extension.

 

5

 

Once enabled, restart IIS.

Once completed, open phpinfo page. You will be able to see that imagick module is added with php.