Reputation: 920
its been 3 days of research, google and frustration to make imagick work on my XAMPP box. I can get as far on making it as php module. But it cannot detect supported formats.
As you can see, I currently have 3.1.2 installed, but I actually worked all the way from the most recent 3.4.1 and jumping from those releases tagged with stable
but I just can't make it work.
When I try to run:
<?php
$handle = fopen('http://xxxxx.png', 'rb');
$img = new Imagick();
$img->readImageFile($handle);
$img->thumbnailImage(100, 0);
echo $image;
I am getting:
Uncaught exception 'ImagickException' with message 'Unable to read image from the filehandle' in xxxxx:5 Stack trace: #0 xxxxx\index.php(5): Imagick->readimagefile(Resource id #3) #1 {main} thrown in xxxxx\index.php on line 5
What I have is:
Windows 8.1 64-bit
PHP 5.6.12, x86, TS
(https://i.sstatic.net/3Xold.png)
This is what I actually have done so far, in terms of installing it:
-Thread Safe (TS) x86
package from
https://pecl.php.net/package/imagickphp_imagick.dll
to C:\_XAMPP\php\ext
(2)
Extract CORE_RL_*
files to C:\_xampp\apache\bin
ImageMagick-7.0.1-1-Q16-x86-dll.exe
from
LinkC:\ImageMagick
*_.dll
file in C:\ImageMagick\modules\coders
copy to
C:\_Xampp\apache\bin
*_.dll
file in C:\ImageMagick\modules\coders
copy to
C:\ImageMagick\
And still can't make my PHP detect Imagick supported file formats even though they should be http://prntscr.com/b1l54u :((
Can somebody tell me what did I miss? Please?
Upvotes: 1
Views: 981
Reputation: 5299
You seem to be going a bit of a convoluted route.
The method I used to install it when I had it running was:
This only worked for a couple of installs and when I upgraded the operating system I could not get it to work due to incompatible versions of php and the Imagick.dll. If I should ever want to use Imagick I would do it on my server as the hosts installed it there for me. You can still write your code locally and test it on your production server. It is a bit of a pain but would probably be quicker/easier than trying to get Imagick working on your PC.
Out of interest I gave up with it and use Imagemagick with exec() and the command line.
Upvotes: 1