Algemeen en interessant nieuws over en door NosTech

NIEUWS

PHP extension Imagick no longer working after upgrading - libMagickWand.so.2 error [Fixed]
17-08-2015 14:13

After upgrading the ImageMagick package on the server with for example the yum command, There is a small possibility that the PHP extension might no longer be working, you can test this with the command php -m | grep imagick, if it returns imagick, then all is working fine. If you get an error like:

PHP Warning:  PHP Startup: Unable to load dynamic library ’/app/vendor/php/lib/php/extensions/no-debug-non-zts-20121212/imagick.so’ - libMagickWand.so.2: cannot open shared object file: No such file or directory in Unknown on line 0

Then things are definitely not so fine. The reason is that you might have it installed imagick using pecl. Since the ImageMagick has been updated, things might have changed. In orde to solve this issue, the easiest way to do this, is to remove the existing installation and reinstall everything. This can be done using the following commands (I’m using yum command, but it should also be working for other package-installers, like apt, …):

yum remove ImageMagick
pecl uninstall imagick

Remove the extension=imagick.so-line from php.ini or rm /etc/php.d/imagick.ini

Restart webserver
service httpd restart

Now we reinstall everything
yum install ImageMagick ImageMagick-devel
pecl install imagick
echo extension=imagick.so >> /etc/php.ini

Restart webserver
service httpd restart

Now to check if things are running fine again
php -m | grep imagick


This should return imagick

< Alle nieuws