Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP Warning: PHP Startup: imagick: Unable to initialize module

I have read similar issues but I believe that the solution to mine might be new:

I have recently upgraded my Windows 10 to PHP 8.2.1, and today I added extension=ext/php_imagick to php.ini, and when running php -v I get the following error:

Warning: PHP Startup: imagick: Unable to initialize module
Module compiled with module API=20210902
PHP    compiled with module API=20220829
These options need to match

I have tried downgrading to PHP 8.1, but the module API version was still more recent, plus I have been downloading Imagick from sources that said it was compatible with PHP 8.2...

I have tried installing the latest version of Imagick from various sources, following this guide, but I keep getting the error.

Thinking that there might not be yet an official packaged version of Imagick compiled with the latest module API, I have been following this guide to compile Imagick by myself, I have put the bin folder URL into the Path, relaunched the command prompt and this time received the error:

the procedure entry point MagickSetSeed could not be located

That was my whole day, I am out of ideas...

like image 936
user3421985 Avatar asked Mar 16 '26 06:03

user3421985


2 Answers

There is no official release of imagick for PHP 8.1+ in windows

However, this is an unofficial build in an open Github issue thread.

https://github.com/Imagick/imagick/issues/573#issuecomment-1431773928

https://github.com/Imagick/imagick/issues/573#issuecomment-1578638424

Note: Try at your own risk, it's not guaranteed that it will work

like image 64
Sarwar Alam Avatar answered Mar 18 '26 22:03

Sarwar Alam


For me it´s probably that is using the wrong Imagick version, get the correct one from https://mlocati.github.io/articles/php-windows-imagick.html

like image 38
Miguel Quesada Avatar answered Mar 18 '26 21:03

Miguel Quesada



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!