Getting ImageMagick to work

nighty99

Verified User
Joined
Jul 26, 2009
Messages
9
First of all.
I´m working with Debian. :)
This is tested and will work with etch and lenny.

1. In Putty login as root, install php5-imagick
Code:
apt-get install php5-imagick

2. In your root Folder ( cd / ) create a symlink to th imagick.so file.
(Yes that is the magic part that is nowhere documented and get that thing working...)
Code:
ln -s /usr/lib/php5/20060613+lfs/imagick.so ./imagick.so

3. Login as admin in your Directadmin Webpanel
Click on File Editor, choose php.ini -> Show File
Scroll down and Paste this in the File (I pasted this above ; Local Variables:)
Code:
[imagick]
extension=imagick.so
And click save.

4. Last Step. Restart httpd. Have Fun :)
Click Home, Service Montior
Search Httpd and click Restart.

Or, in shell ;)

Code:
/etc/init.d/httpd restart

Many thanks for Xaver form http://www.xwissen.info
Who had the idea with the Symlink. ;)
 
Last edited:
imagick.so should be put in whatever is defined for extension_dir in the php.ini file.

You can also use pecl:

Code:
pecl install imagick
cp /usr/local/lib/php/extensions/no-debug-non-zts-20060613/imagick.so /usr/local/lib/php/extensions
echo "extension=imagick.so" >> /etc/php.ini
servicehttpd restart

Notes:
Above specifically for CentOS
/usr/local/lib/php/extensions is what is defined in my php.ini file for extension_dir
The location of your php.ini file may be different
You method of restarting httpd may be different.

I posted the solution for CentOS here since debian was not in the thread title
and others may come here looking for the answer only to find that it is for
debian only.

It should probably be in the HOWTO instead of General Technical Discussion & Troubleshooting
 
Back
Top