How to install Imagick/imagemagick PHP extension on windows 7
Check permissions on the .dll file to make sure the Apache user has read access to the file. Better change the permission of the [PHP]/extension directory.
To change the permission
- Right click the file(s) or folder(s)
- Select "Properties"
- Select "Security" tab
- Click on "Edit" button.
Change the permission of user to Full Control.
- Download the binaries on the PECL page (look for the "DLL" links).
- alternative listing (more direct access, same files)
- Open the archive, copy all the *.dll files to the "php\ext" directory.
-
Add the extension to your php.ini:
- Usually you should add
extension=php_imagick.dll
. - On some WAMP platforms, it might be instead
extension=ext/php_imagick.dll
. Just look how the existing extensions are defined and do alike.
- Usually you should add
- Restart web server.
At this point, Imagick is installed, but you will probably encounter this error:
ImagickException: NoDecodeDelegateForThisImageFormat
It means you have to install ImageMagick as well:
- On this page, download the ImageMagick archive corresponding to the Imagick you have installed (MSVC version, CPU architecture).
- Open "bin" directory of this archive, copy the *.dll files to the "php\ext" directory. For example, you'll need IM_MOD_RL_jpeg_.dll for JPEG handling.