Php error: class "Imagick" not found

I get an error "Class" Imagick not found ". Somehow I need to make this library available for php. I use Php 5.2.6 on Fedora 8. My php_info has no mention of ImageMagick.

I tried: yum install ImageMagick and restart apache, which is not working.

I also added the extension = imagick.ext to the php.ini file and restarted apache, which did not work.

+52
php
Sep 24 '10 at 19:12
source share
7 answers

From: http://news.ycombinator.com/item?id=1726074

For i386 distributions based on RHEL:

yum install ImageMagick.i386 yum install ImageMagick-devel.i386 pecl install imagick echo "extension=imagick.so" > /etc/php.d/imagick.ini service httpd restart 

This may also work with other i386 distributions using the yum package manager. For x86_64, just replace .i386 with .x86_64

+18
Sep 25 2018-10-18T00:
source share

For everyone who has problems with this, I did this tutorial:

How to install Imagemagick and php Imagick module on ubuntu?

I took this 7 simple steps:

Update libraries and packages

 apt-get update 

Remove obsolete items

 apt-get autoremove 

For ImageMagick Libraries

 apt-get install libmagickwand-dev 

for the main class Imagick

 apt-get install imagemagick 

To create binary files and the relationships between them

 pecl install imagick 

Add the extension to your php.ini

 echo "extension=imagick.so" >> /etc/php5/apache2/php.ini 

Restart apache

 service apache2 restart 



I found a problem. PHP searches for .so files in a folder named / usr / lib / php 5/20100525, and imagick.so is stored in a folder named / usr / lib / php 5/20090626. Therefore, you need to copy the file to this folder.

+53
Feb 28 '13 at 19:57
source share

Ubuntu

 sudo apt-get install php5-dev pecl imagemagick libmagickwand-dev sudo pecl install imagick sudo apt-get install php5-imagick sudo service apache2 restart 

Some dependencies may already be fulfilled, but excluding the Apache service, all that PHP needs to use the Imagick class.

+10
Aug 2 '13 at 17:48
source share

For MAMP running on Mac OSX

Find out which version of PHP and install the correct version through brew

 brew install homebrew/php/php56-imagick 

Add extension by changing php.ini template in MAMP

enter image description here

Make sure Imagick

enter image description here

+9
May 01 '16 at 4:37
source share

Debian 9

I just did the following, and all that was needed was also automatically installed.

 sudo apt-get -y -f install php-imagick sudo /etc/init.d/apache2 restart 
+5
Jul 19 '17 at 8:12
source share

Install Imagic in PHP7:

 sudo apt-get install php-imagick 
+1
Aug 09 '18 at 13:47
source share

On EC2 in AWS, I did this:

  yum list | grep imagick 

Then I found a list of those that I could install ...

  php -v 

told me which php version i had and therefore which imagick version

 yum install php56-pecl-imagick.x86_64 

Did the trick. Enjoy it!

0
Apr 04 '19 at 15:44
source share



All Articles