Can't load Magick.dll

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Post Reply
PaulS

Can't load Magick.dll

Post by PaulS »

win7-64
ActivePerl-5.12.2.1203
ImageMagick-6.6.6-6

I am unable to get PerlMagick to work - there is a problem loading magick.dll. It appears to be installed correctly, and shows up as installed in the perl package manager. The error is:

Error Summary
HTTP Error 502.2 - Bad Gateway
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are "Can't load 'C:/Perl/site/lib/auto/Image/Magick/Magick.dll' for module Image::Magick: load_file:The specified module could not be found at C:/Perl/lib/DynaLoader.pm line 201. at H:\Projects\Melody\demo\demo.pl line 5 Compilation failed in require at H:\Projects\Melody\demo\demo.pl line 5. BEGIN failed--compilation aborted at H:\Projects\Melody\demo\demo.pl line 5. ".

This is on win7-64 with IIS7. I have tried both 32-bit and 64-bit versions. The file is there. This happened with both the 32-bit and 64-bit versions of activestate perl and imagemagick. PerlMagick is described as for 1202 but I have perl 1203 installed - if that makes a difference. Imagemagick is also not detected in Melody (movable type).

Could this be file permissions or something?
PaulS

Re: Can't load Magick.dll

Post by PaulS »

win7-64, IIS7

I am getting the Can't load Magick.dll error:

Using a dependency walker I tested if magick.dll was picking up it's dependencies. I copied the dlls from the imagemagick install into the perlmagick directory C:\Perl\site\lib\auto\Image\Magick, and it then loaded, and Melody (movable type) now detects imagemagick. The perlmagick demo demo.pl still won't run either from the browser or the "perl demo.pl" command line.

So there is some sort of install configuration problem. It should not be necessary to move any dlls around after the install. The PATH environment has the correct paths.

These are the installed locations. How can this be fixed? Magick.dll is not finding the perl or imagemagick dlls.

C:\Perl\bin
C:\Perl\site\lib\auto\Image\Magick
C:\Program Files (x86)\ImageMagick-6.6.6-Q16
Last edited by PaulS on 2010-12-21T00:29:33-07:00, edited 1 time in total.
PaulS

Re: Can't load Magick.dll

Post by PaulS »

I could not figure out why the Path environment was not working. So finally I tried rebooting, and this seems to be working. magick.dll is now finding it's dependencies in the imagemagick program folder. Perhaps the windows install should have a warning about rebooting. I was not aware that the Path wouldn't update immediately.

The demo.pl is still not working. The image files are there. This is what I get:

HTTP Error 502.2 - Bad Gateway
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are "Exception 435: unable to open image `model.gif': No such file or directory @ error/blob.c/OpenBlob/2584 at H:\Projects\Melody\demo\demo.pl line 18. Exception 435: unable to open image `smile.gif': No such file or directory @ error/blob.c/OpenBlob/2584 at H:\Projects\Melody\demo\demo.pl line 24. Can't locate object method "Label" via package "Exception 410: no images defined `Image::Magick' @ error/Magick.xs/XS_Image__Magick_Clone/2908" (perhaps you forgot to load "Exception 410: no images defined `Image::Magick' @ error/Magick.xs/XS_Image__Magick_Clone/2908"?) at H:\Projects\Melody\demo\demo.pl line 35. Read... Transform image... Adaptive Blur... ".
Post Reply