note 94167 deleted from imagick.installation by danbrown

From: Date: Tue, 20 Oct 2009 21:05:13 +0000
Subject: note 94167 deleted from imagick.installation by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-161925@lists.php.net to get a copy of this message
Note Submitter: gmorris at ilogsystems dot com ---- I struggled to get imagick installed for mamp and dug high and low. I was left with the impression that so many struggle with opensource and this type of install that it is almost a right of passage. For my part, I managed to find two threads that helped me and the steps work. A lot of people talked about macports and pear installs which are fine(I tried them), but 1) they sometimes don't get the latest version of what you need and 2) I can't tell what they're doing and where they're doing it. It's much easier to me to download the stuff where i want it and be sure of what i got! First of all download a tar image of the ImageMagick install from here: sourceforge.net/projects/imagemagick/files/ Unpack it and then from terminal issue the following commands in quotes: 1. "cd ImageMagick-6.5.7" - go where you placed the folder 2. "./configure" 3. "make" If ImageMagick configured and compiled without complaint, you are ready to install it on your system. Administrator privileges are required to install. To install, type the following command in terminal: 1. "sudo make install" To check your ImageMagick installation enter the following command in terminal: 1. "make check" Remember all commands are entered into terminal in the directory in which you unzipped your downloaded ImageMagick tar file. (the latest version of which at this time of writing is ImageMagick-6.5.7.) Next we need to install Imagick.so which is what we want for PHP. First of all we need to get the right file and we can get that from here: pecl.php.net/package/imagick/download At current writing the latest stable version is imagick-2.3.0. Unpack the tar file and then enter the commands in quotes in terminal: 1. "cd imagick-2.2.3" - go where you placed the folder 2. "phpize" 3. "./configure --with-imagick=/opt/local" 4. "make" 5. "make install" If you look at the bottom of the output, it will tell you where it has placed the imagick.so module. For me it was placed in: /imagick-2.3.0/modules which is where i had unpacked the downloaded imagick-2.3.0 file. Then copy it into your MAMP PHP extensions folder. For me it was: /Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts -20050922/ Then, for PHP to honor the the extension, add the following line to the extensions section of your php.ini file: extension=imagick.so You should now have a working imagick extension with all of the resources for php found here: php.net/manual/en/book.imagick.php I will not claim credit for anyone for whom this works, that goes to: Imagemagick who posted instructions here: www.imagemagick.org/script/install-source.php and Wallance who posted his experience here: www.daniweb.com/forums/thread194181.html# I really hope this helps others because developing this stuff is frustrating enough without spending hours or even days just trying to set up the development environment so you can use the tools.

« previous php.notes (#161925) next »