0

I'm setting up a project on a Windows server and having an issue with ImageMagick. I'm from a Linux background and struggling to get it working.

I have downloaded from http://pecl.php.net/package/imagick and installed into C:\Program Files\ImageMagick-7.1.0-Q8. I then copied the file php_imagick.dll into the ext folder in the PHP installation and added to php.ini. php -m shows the module installed and I can generate a SVG image from PHP. However, now I need to include a PNG in a PDF I get the following error:

UnableToLoadModule 'C:\Program Files\ImageMagick-7.1.0-Q8\IM_MOD_RL_PNG_.dll': The specified procedure could not be found. @ error/module.c/OpenModule/1287

I can see the file exists in the folder so it's not that the file is missing but it's unable to load it for some reason.

Any ideas what the issue could be? Anything I can check?

PHP8.1 running as FastCGI in IIS if that matters.

2 Answers 2

0

I found a PowerShell module which helps install the PHP extension on Windows

A PowerShell module that will let you install the PHP imagick extension simply with Install-PhpExtension imagick

1
  • 1
    Thanks! That's done the trick!
    – DanC
    Oct 3, 2022 at 9:58
0

I had to install the ImageMagick package from PECL. The .dll libs provided in the Imagick package seem to be broken.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .