These instructions will install the ImageMagick binaries as well as the PHP extension for the default OSX Apache/PHP setup. If you prefer not to use MacPorts there are binaries available, however you may have to deal with some dependencies and configuration on your own.
Note version is 3.0.1 in these instructions, adjust the commands depending on the version that is downloaded by pecl.
The install process will create a file “imagick.so”, but it may not be automatically installed in the correct location depending on your PHP path settings. The install will output the location of the .so file so if necessary, you can manually move that file to the extensions directory for your web server.
That should be it. Restart Apache and view phpinfo.php. There should be a section for ImageMagick
1. Install ImageMagick
sudo port install ImageMagick
2. Install imagic module
You’d expect to just be able to run “pecl install imagick” and I would probably try it first. However the instructions below will work if the automatic installation returns the error: ImageMagick MagickWand API configuration program… configure: error: not found. Please provide a path to MagickWand-config or Wand-config program. ERROR: ‘/private/tmp/pear/temp/imagick/configure –with-imagick=/opt/local/bin/’ failed.Note version is 3.0.1 in these instructions, adjust the commands depending on the version that is downloaded by pecl.
pecl download imagick
tar xvzf imagick-3.0.1.tgz
cd imagick-3.0.1
phpize
./configure --with-imagick=/opt/local
make
sudo make install
The install process will create a file “imagick.so”, but it may not be automatically installed in the correct location depending on your PHP path settings. The install will output the location of the .so file so if necessary, you can manually move that file to the extensions directory for your web server.
3. Append to php.ini
extension=imagick.so
That should be it. Restart Apache and view phpinfo.php. There should be a section for ImageMagick
0 comments:
Post a Comment