[magick-users] Imagick PHP extension & Windows
Paul Groves
paul.groves at computing-services.oxford.ac.uk
Mon Sep 22 13:07:52 PDT 2003
Has anyone had any luck using the Imagick PHP extension (see:
http://pear.php.net/package-info.php?package=imagick&release=0.9.8) on a
Windows server? I finally managed to successfully installed the Windows
version of the extension (a dll, produced by Frank Kromann, downloaded from
here: http://kromann.info/pear-pecl.php), after realising I needed to
install the Q8 *dll* version of ImageMagick for it to work (as well as
editing the php.ini file appropriately). I'm using the latest version of
ImageMagick (5.5.7), PHP Imagick version 0.98 and PHP version 4.3.3.
The Imagemagick extension *looks* like it has successfully installed, as its
listed in the phpinfo() report okay, but when I tried to use the example php
scripts contained in the original .tgz distribution I get the same sort of
error with *all*of them, so I think there is some kind of problem:
Warning: imagick_iserror() expects parameter 1 to be resource, boolean given
in D:\Inetpub\wwwroot\imagick\getmimetype.php on line 3
Warning: imagick_getmimetype() expects parameter 1 to be resource, boolean
given in D:\Inetpub\wwwroot\imagick\getmimetype.php on line 12
This is the relevent code for the getmimetype.php script above,
<?
$handle = imagick_readimage( getcwd() . "/image.jpg" ) ;
if ( imagick_iserror( $handle ) )
{
$reason = imagick_failedreason( $handle ) ;
$description = imagick_faileddescription( $handle ) ;
print "handle failed!<BR>\nReason: $reason<BR>\nDescription:
$description<BR>\n" ;
exit ;
}
print imagick_getmimetype( $handle ) . "<BR>\n" ;
?>
Any ideas on what's wrong? Has anyone got the example scripts worrking on a
Windows server? Sounds like the scripts are expecting $handle to be of
datatype "resource" not boolean (which makes sense), but I don't know how to
fix this.
regards
Paul
More information about the Magick-users
mailing list