Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

homebrew -- Image Magick throwing version error when executing Php

PHP execution is throwing a Warning about Imagick...

Output of php -v:

PHP Warning: Version warning: Imagick was compiled against Image Magick 
version #### but version #### is loaded. Imagick will run but may behave
surprisingly in Unknown on line 0
like image 420
Artistan Avatar asked Mar 09 '23 17:03

Artistan


1 Answers

You have certainly upgraded imagick after installing PHP, so you need to reinstall imagick using pecl.

Run the following:

sudo pecl uninstall imagick
sudo pecl install imagick

If you run php -v and see a warning saying that the module imagick was already loaded, check your ini file:

php -i | grep 'Configuration File'

Then open the file and remove duplicate entries of extension="imagick.so". You might need to look into the configuration path to check also other ini files.

like image 54
Ricardo Metring Avatar answered Apr 09 '23 02:04

Ricardo Metring