PHP and Imagick Installation Issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm trying to use Imagemagick on windows with php and having trouble
getting it to work. Any help on what I might be missing or doing wrong
would be greatly appreciated. I've laid out below in detail the steps
I've already taken:

Background: I am running windows Vista, and have pHp 5.2.5 installed
and Apache v 2.2.8 installed

Step 1. Installed binary release imagemagick for windows, version:
ImageMagick-6.4.6-1-Q16-windows-dll.exe (Win32 dynamic at 16
bits-per-pixel) from
http://www.imagemagick.org/script/binary-releases.php (Imagemagick
seems to be working because the suggested test commands are working:
convert logo: logo.gif, identify logo.gif, imdisplay logo.gif)

Step 2. Downloaded php_imagick.dll from
http://pecl4win.php.net/ext.php/php_imagick.dll  (Downloaded version
for php-5.2.1).

Step 3. Copied php_imagick.dll file to five directories (copied into
multiple directories just to be safe):
Apache2.2\php\ext, Apache2.2\bin, Windows\system, Windows\System32,
C:\Program Files\ImageMagick-6.4.6-Q16

Step 4. Added extension=php_imagick.dll to php.ini

Step 5. Copied all .dll files frm C:\Program
Files\ImageMagick-6.4.6-Q16 into following directories (copied into
multiple directories just to be safe):
Apache2.2\php\ext, Apache2.2\bin, Windows\system, Windows\System32

Step 6. Added MAGICK_HOME as an environment variable pointing to
C:\Program Files\ImageMagick-6.4.6-Q16

Step 7. Ran the following script to test whether imagick was working:

<html> <head> <title>Test for ImageMagick</title> </head>
<body>
<?php
function alist ($array) {  //This function prints a text array as an html list.
  $alist = "<ul>";
  for ($i = 0; $i < sizeof($array); $i++) {
    $alist .= "<li>$array[$i]";
  }

  $alist .= "</ul>";
  return $alist;
}

exec("convert -version", $out, $rcode); //Try to get ImageMagick
"convert" program version number.
echo "Version return code is $rcode <br>"; //Print the return code: 0
if OK, nonzero if error.
echo alist($out); //Print the output of "convert -version"

?> </body> </html>

Step 8. Got the following result in browser:

Version return code is 1

Version: ImageMagick 6.4.6 2008-11-21 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2008 ImageMagick Studio LLC


It looks like Imagick is not working, else the version return code
above should have been 0. Any help would be greatly appreciated!!

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux