PHP Warning: PHP Startup: imagick: Unable to initialize module
Asked Answered
B

2

11

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

Burt answered 16/1, 2023 at 18:35 Comment(3)
After downgrading to PHP 8.0.27: Module compiled with module API=20190902 and PHP compiled with module API=20200930Burt
I solved my issue by downgrading to PHP 8.1 and using this version of Imagick, but I shouldn't put this as the accepted solution because it's really just a workaround and not an actual solutionBurt
Possible the imagick can work until PHP 8.1? My local is PHP 8.2 which totally cannot use at allMauney
C
4

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

Cannonry answered 6/8, 2023 at 23:50 Comment(0)
O
0

try this versions

php-8.2.19-Win32-vs16-x64.zip with php_imagick-3.7.0-8.2-ts-vs16-x64.zip

php-8.2.19-nts-Win32-vs16-x64.zip with php_imagick-3.7.0-8.2-nts-vs16-x64.zip

Owenowena answered 27/5 at 3:54 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Genoese

© 2022 - 2024 — McMap. All rights reserved.