8

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...

user3421985
  • 155
  • 1
  • 7
  • After downgrading to PHP 8.0.27: `Module compiled with module API=20190902` and `PHP compiled with module API=20200930` – user3421985 Jan 16 '23 at 18:58
  • 5
    I solved my issue by downgrading to PHP 8.1 and using [this version of Imagick](https://mlocati.github.io/articles/php-windows-imagick.html), but I shouldn't put this as the accepted solution because it's really just a workaround and not an actual solution – user3421985 Jan 16 '23 at 19:26
  • Any update on this? – S. W. G. Jun 24 '23 at 19:07
  • Possible the imagick can work until PHP 8.1? My local is PHP 8.2 which totally cannot use at all – Cracker Rex Jul 21 '23 at 09:18

1 Answers1

0

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

Sarwar Alam
  • 59
  • 2
  • 9