I can't figure out how to install Imagick php extension on my local Apache Server.
I use EasyPHP 14.1
PHP version is 5.5.8
I did install ImageMagick 6.9.3-8 Q8 x64, seems to work fine.
Then I downloaded php_imagick-3.1.2-5.5-ts-vc11-x86 package from https://pecl.php.net/package/imagick/3.1.2/windows
Then copied php_imagick.dll file to C:\Program Files (x86)\EasyPHP-DevServer-14.1VC11\binaries\php\php_runningversion\ext
and copied CORE...dll files to C:\Program Files (x86)\EasyPHP-DevServer-14.1VC11\binaries\apache\bin
Finally I added 'extension=php_imagick.dll' into my php.ini file
I also installed Ghostscript 9.19
At this point, all seems fine.
The EXEC console 'identify -list format' command line returns many formats, including pdf.
Now, let's test the IM extension:
Code: Select all
<?php
$imagick = new Imagick($_SERVER['DOCUMENT_ROOT'] .'/projects/mypath/test-imagick.pdf');
$imagick->readImage($_SERVER['DOCUMENT_ROOT'] .'/projects/mypath/test-imagick.pdf');
$imagick->writeImages($_SERVER['DOCUMENT_ROOT'] .'/projects/mypath/convertedtestimagick.jpg', false);
?>
Code: Select all
Fatal error: Uncaught exception 'ImagickException' with message 'NoDecodeDelegateForThisImageFormat `C:/Program Files (x86)/EasyPHP-DevServer-14.1VC11/data/localweb/projects/caue-mypath/test-imagick.pdf' @ error/constitute.c/ReadImage/555' in C:\Program Files (x86)\EasyPHP-DevServer-14.1VC11\data\localweb\projects\mypath\test.php:10 Stack trace: #0 C:\Program Files (x86)\EasyPHP-DevServer-14.1VC11\data\localweb\projects\mypath\test.php(10): Imagick->__construct('C:/Program File...') #1 {main} thrown in C:\Program Files (x86)\EasyPHP-DevServer-14.1VC11\data\localweb\projects\mypath\test.php on line 10
Could someone tell me where I got it wrong?
Thanks in advance for your help
Vinny