If I really didnt need this I would have dropped ImageMagick a long time ago....HORRIBLE documentation
I got IIS 7.5 to recoginize the PHP_imagick.dll FINALLY......
Next step is to run exec() in PHP
1. Went to this site and found the newer dlls for PHP 5.3 and 5.4 -
http://valokuva.org/?p=197
*Downloaded the imagick-php54-php53.tgz. and used winzip to open it...if you use Winzip you can see the Path field of the .tgz file...this tells you which one is for 5.3 and which is for 5.4
*I only tool the one dll for PHP 5.3 but there are the dlls for 5.4 as well (saved them of course)
2. I DID NOT install the latest version of ImageMagick - I installed this one - ImageMagick-6.8.0-1-Q8-windows-dll.exe
3. Go back ito IIS Manager and click on PHP for that website and then clikc on Check phpinfo() ...
* I can now see the 'imagick' in the php info
I have NOT done anything else for rights, permissions, installations etc....
JUST the above
what else am I missing
Starting to test I run this:
Code: Select all
$magick_dir = 'C:\ImageMagick' ; // install IM in short DOS 8.3 compatible path
$send_cmd=$magick_dir .'\convert uploads\17364.pdf uploads\thumbs\Test.png' ;
$array=array();
echo "<pre>";
exec("convert $send_cmd 2>&1", $array);
echo "<br>".print_r($array)."<br>";
echo "</pre>";
$magickDir2 = 'C:\ImageMagick';
$send_cmd2=$magickDir2 .'\convert -list configure';
$array=array();
echo "<pre>";
exec("convert $send_cmd2 2>&1", $array);
echo "<br>".print_r($array)."<br>";
echo "</pre>";
I get this:
Array
(
[0] => convert.exe: unable to open image `C:\inetpub\wwwroot\ImageUpload\ImageMagick\convert': No such file or directory @ error/blob.c/OpenBlob/2638.
[1] => convert.exe: no decode delegate for this image format `C:\inetpub\wwwroot\ImageUpload\ImageMagick\convert' @ error/constitute.c/ReadImage/550.
[2] => convert.exe: Postscript delegate failed `uploads\17364.pdf': No such file or directory @ error/pdf.c/ReadPDFImage/679.
[3] => convert.exe: no images defined `uploads\thumbs\Test.png' @ error/convert.c/ConvertImageCommand/3044.
)
1
Array
(
[0] =>
[1] => Path: [built-in]
[2] =>
[3] => Name Value
[4] => -------------------------------------------------------------------------------
[5] => NAME ImageMagick
[6] =>
[7] => Path: configure.xml
[8] =>
[9] => Name Value
[10] => -------------------------------------------------------------------------------
[11] => CC vs10
[12] => COPYRIGHT Copyright (C) 1999-2012 ImageMagick Studio LLC
[13] => DELEGATES bzlib freetype jpeg jp2 lcms png tiff x11 xml wmf zlib
[14] => FEATURES OpenMP
[15] => HOST Windows
[16] => LIB_VERSION 0x680
[17] => LIB_VERSION_NUMBER 6,8,0,1
[18] => NAME ImageMagick
[19] => RELEASE_DATE 2012-11-01
[20] => VERSION 6.8.0
[21] => WEBSITE
http://www.imagemagick.org
[22] => convert.exe: unable to open image `C:\inetpub\wwwroot\ImageUpload\ImageMagick\convert': No such file or directory @ error/blob.c/OpenBlob/2638.
[23] => convert.exe: no decode delegate for this image format `C:\inetpub\wwwroot\ImageUpload\ImageMagick\convert' @ error/constitute.c/ReadImage/550.
)
1