2

I am trying for 1 days and this php imagick don't work in windows. It shows

ImageMagick number of supported formats:    0
ImageMagick supported formats   no value

First I went to official php website from here

http://windows.php.net/download/

And downloaded VC14 x64 Non Thread Safe (2017-May-09 23:02:49) PHP 7.1.5

I extracted it into C:\ProgramData\php and added it to PATH variable.

And from that directory i renamed php.ini -devlopment to php.ini

And changed line 738 to extension_dir = "ext" so that extensions can be loaded in PHP.

Then php must be working now. I went to http://windows.php.net/downloads/pecl/releases/imagick/3.4.3/ And downloaded php_imagick-3.4.3-7.1-nts-vc14-x64.zip

And from that zip file i extracted php_imagick.dll into C:\ProgramData\php\ext directory

And also from that zip file I extracted CORE_RL_*.dll into C:\ProgramData\php folder.

And I added extension=php_imagick.dll to php.ini file at line 892

After that i went to http://windows.php.net/downloads/pecl/deps And downloaded ImageMagick-6.9.3-7-vc14-x64.zip and extracted content of that folder to C:\ProgramData\ImageMagick directory. And I added C:\ProgramData\ImageMagick\bin to my path.

I think I have done all configuration.

But when I create index.php and add phpinfo() function to file in desktop and try to run

php -S localhost:8080

and go to localhost:8080 in web browser it shows

imagick module  enabled
imagick module version  3.4.3
imagick classes Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator, ImagickKernel
Imagick compiled with ImageMagick version   ImageMagick 6.9.3-7 Q16 x64 2016-03-27 http://www.imagemagick.org
Imagick using ImageMagick library version   ImageMagick 6.9.3-7 Q16 x64 2016-03-27 http://www.imagemagick.org
ImageMagick copyright   Copyright (C) 1999-2015 ImageMagick Studio LLC
ImageMagick release date    2016-03-27
ImageMagick number of supported formats:    0
ImageMagick supported formats   no value

Clearly it is not working .Where did I make mistake. Imagik is so painful to install :(

  • "Imagik is so painful to install" That is one reason why I do not use it. If you are using it for development I assume it is installed on your server. Why not get the rest of your site working on your localhost and get the Imagick code working on the server? I use Imagemagick through the command line with exec( ) – Bonzo May 12 '17 at 11:43
  • @Bonzo i guess found the solution you can watch if you are facing . But i agree running exec() would be good :) – Me Noob Sir May 12 '17 at 11:44
  • Add the imagick .dlls into the php folder containing php.exe. Saved my life, this post. Take a look here: https://stackoverflow.com/a/48600203/1965718 – cliffclof Feb 20 '22 at 11:45

1 Answers1

0

Recently I found this solution:

I went to C:\ProgramData\php and deleted CORE_*.dll file which i copied .

I needed to copy that as doing php -v was showing error at that time.

and after immediately deleting and rebooting server it showed

ImageMagick number of supported formats:    234

I don't know what is happening but i am happy it is working

And above steps will work as documentation for other user who are in problem like me :)