lalalow
lalalow

Reputation: 21

How to make ImageMagick Imagick class available?

This is a really amateur question but I've installed ImageMagick from the ports on my FreeBSD.

However when I use

$image = new Imagick($filename);

I get:

Fatal error: Class 'Imagick' not found in /usr/local/www/test.php on line 1

How do I make this class accessible to the scripts?

Upvotes: 2

Views: 22309

Answers (4)

Pouma
Pouma

Reputation: 11

apt-get install imagemagick && apt-get install php-imagick

(Ubuntu)

Upvotes: 1

Jon Kirkman
Jon Kirkman

Reputation: 475

You will also need to get/build the accompanying PHP library that interfaces with Image Magick. Then add it to your php.ini with something like:

extension=php5-imagick.so

There is also a OS X / Darwin port available here.

Upvotes: 2

Ewan Todd
Ewan Todd

Reputation: 7312

pecl install imagick

See the manual.

Upvotes: 3

etheros
etheros

Reputation: 2783

You installed the ImageMagick suite itself, which does not provide any interface to PHP. You also need to install the PECL Imagick extension.

FreeBSD has a port available for this - graphics/pecl-imagick.

Upvotes: 2

Related Questions