Install ImageMagick extension using php / windows

Running PHP version 5.2.5 on Windows Server 2003 using IIS.

It has an almost identical server on which we could install ImageMagick without any problems. It works on exactly the same php version. The following steps were completed for the installation, but it simply does not work on this server. ImageMagick itself is installed, but php does not download the extension.

We spent hours trying to install the extension. It just won't appear in phpinfo ().

INSTALL STEPS

To install IMagick on Windows XP (PHP 5.2.x)

+15
php iis imagemagick windows-server-2003
May 18 '10 at 2:59 a.m.
source share
9 answers

Found a very useful answer given by the user Buttercup, also if it could be more clear.

My script was Windows 2012 R2 x64, PHP 5.5.19 x64 and I need to install ImageImagick with PHP support. The following points below I was able to install ImageImagick 6.9.0 x64 and PHP_Imagick.dll 3.1.2 (both are currently the latest stable versions).

Please note that I downloaded all components (PHP, ImageImagick and PHP_Imagick) in NTS and x64 modes: not in TS and / or x86 modes. I do not know if this is applicable in your own case.

The point at which it was not clear that I read Buttercup (as for the RhoVisions user) was his comment: "Overwrite DLLs found from ImageMagick 6.8.8. Windows version with PHP version."

So this is what I did (based on the Buttercup solution, which I have to thank you again and again!): 1) download the latest ImageMagick EXE installer from http://www.imagemagick.org/script/binary-releases. php # windows In my case, I uploaded the first file available as an HTTP download with the caption “Win64 dynamic with 16 bits per pixel” (filename: ImageMagick-6.9.0-0-Q16-x64-dll.exe)

2) Run the setup program you just downloaded. I set it to a simple path, for example C: \ ImageMagick6.9.0 (but I don’t think it is so important to move it away from the program files). In addition, during the installation, I did not change any other default settings.

3) download the latest version of the PHP_Imagick DLL from the PECL website at: http://pecl.php.net/package/imagick I chose the stable version (not Beta or RC), in my case 3.1.2, by clicking on the icon Windows Logo + DLL. In my case, this was due to ht tp: //pecl.php.net/package/imagick/3.1.2/windows. On the page that opens, you will find a table: you must select a file depending on: a) the number of PHP versions you have (in my case there were available DLLs for PHP 5.3, 5.4, 5.5, 5.6) b) x64 or x86 version of PHP that you you have c) NTS or TS version of PHP you have My business was PHP 5.5.x, x64, NTS: so I downloaded the one that was marked as “5.5 Non Thread Safe (NTS) x64” (file name: php_imagick-3.1. 2-5.5-nts-vc11-x64.zip)

4) Unzip the php_imagick ZIP file and: a) copy the php_imagick.dll file to the EXT folder of your PHP installation b) copy and replace ALL CORE_RL_.dll from the folder that you just unzipped to the folder that you selected in step 2. Obviously, please back up replaced files. In my case, I copied 8 CORE_RL_.dll files from the unpacked folder to C: \ ImageMagick6.9.0. I went to C: \ ImageMagick6.9.0, the rest CORE_RL _ *. Dll not overwritten.

5) Edit and save the PHP.ini file to add this simple line: extension = php_imagick.dll

6) Restart your server (unfortunately, I did not find a good alternative to rebooting: also IISRESET from the admin command line did not work).

7) Upon completion of the reboot, you can remotely send the browser with your phpinfo.php file to make sure that the Imagick module is in order. In my case it was.

Hope this helps, there!

+7
Dec 10 '14 at 22:08
source share

I found an alternative source. Direct PECL download.

Installed Steps

Install ImageMagick

Where to download the latest version of ImageMagic compatible with IIS 8.1 / Windows 2012r2 php x64:

http://windows.php.net/downloads/pecl/deps/

go and download: ImageMagick-6.8.8-vc9-x86.zip for PHP 32-bit, 5.4.xx

ImageMagick-6.8.8-vc11-x86.zip for PHP 32-bit, 5.5.xx

ImageMagick-6.8.8-vc11-x64.zip for PHP 64-bit, 5.5.xx

Tips:

  • Overwrite DLLs found in ImageMagick 6.8.8. Windows version with PHP version.

  • You need to reboot if the files are locked in memory.

php_imageMagick.dll location

http://windows.php.net/downloads/pecl/releases/imagick/

Download the appropriate DLLs.

You get the latest ImageMagick dll files, php_imagemagick.dll (both unsafe and thread-safe versions).

Tip:

  • If you lose the php5ts.dll file, you downloaded the wrong version of php_imagemagic.dll and download another version.

  • if you use IIS - use the NTS version - php_imagemagick_nts.dll

  • if you use Apache - use the "TS" version - php_imagemagick_ts.dll

+4
Feb 09
source share

On Windows, you should check 3 parameters if you want to add the extension to the php server:

  • The compiler version compiled by your php server (VC9 or VC10) specified in phpinfo() .

  • The PHP extension API number specified in phpinfo() .

  • The most important parameter is whether your web server is ts (thread-safe) or nts (thread-unsafe), which is specified in phpinfo() .

I realized that by default IIS is nts, and the php extension must be compiled using the nts php library to work correctly on your web server. However, if you want to load your extension correctly, your extension and your php web server must be the same in these three parameters.

+2
Jan 13 '13 at 9:05
source share

This is an old question, but I have come across similar issues with PHP / IIS before. A few things I could suggest checking twice:

  • Use the phpinfo page to find out if you are editing the correct php.ini file, look at the “Uploaded php.ini file” on the first page (how silly since I did it before - sometimes PHP will look for it in its own folder, sometimes C: \ Windows)
  • also try including display_errors in On and error_reporting in E_ALL in php.ini and see if there are error messages at the very bottom of the phpinfo file. He usually at least admits that he cannot load your DLL.
+1
Dec 23 '10 at 18:56
source share

At http://www.imagemagick.org/download/binaries/ and http://valokuva.org/outside-blog-content/ , there are several DLL files: one for x64 and one for x86. If your Windows XP is 32-bit, you need to try the x86 DLL.

+1
Jan 04 '13 at 18:40
source share

You do not need to restart windows. You need to restart application pools running PHP exe. This can be done either by resetting IIS (this is the best option to get all application pools before reset). Or recycle application pools running PHP.

+1
Jul 11 '14 at 23:47
source share

nothing worked until I set permissions for the imagick folder and c: \ windows \ temp (IUSR read / execute for imagick, read / write / execute for Windows \ temp).

* I'm not 100% sure that reading / writing / executing was necessary for Windows \ temp, but it was listed on the site somewhere during my google surfing *

It's pretty accurate that part of the reboot is to make sure the imagick folder is in the system path directory and displayed in phpinfo (), it was already in my path, so I didn't have to reboot after setting permissions.

+1
Aug 24 '16 at 8:12
source share

It is quite difficult to map imagix extensions to their base and version of PHP. So, to get rid of the installation problems, I would suggest using a server stack that sends Imagick and its extension, such as WPN-XM .

0
Feb 02 '15 at 20:57
source share

In my case, restarting Windows (mentioned in step 4) did the trick.

-one
Aug 18 '11 at 16:23
source share



All Articles