views:

383

answers:

3

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?

+1  A: 

pecl install imagick

See the manual.

Ewan Todd
A: 

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.

etheros
A: 

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.

Jon K