ImageMagick is a powerful server-side image processing tool, much more powerful than GD. Many PHP sites with the application of a wide range, began to use ImageMagick, although its configuration is not complex, but if a few need to pay attention to the place without attention, I am afraid to waste a lot of time and energy. This article is intended to help these people, try to install the configuration successfully.
This paper refers to a large number of data at home and abroad. Includes ImageMagick official documents.
The first step is to download the compile ImageMagick.
Note that the main points, 1, version, version to be compatible with the following magickwand, otherwise there will be errors in the compilation. 2, add the –enable-shared–with-modules option, otherwise it may last Magickwand for PHP failed to compile successfully.
TAR-JXVF imagemagick-6.3.3-10.tar.bz2
CD ImageMagick-6.3.3
./configure–enable-shared–enable-lzw–without-perl–with-modules
Make
Make install
Compilation complete
Step two, install Magickwand for PHP
TAR-JXVF magickwandforphp-1.0.4.tar.bz2
CD MagickWandForPHP-1.0.4
/usr/local/bin/phpize (without phpize, you need to install PHP first before you can do this.) In addition, this tool is also in the Php-devel package. )
./configure–with-php-config=/usr/local/bin/php-config–enable-shared–with-magickwand=/usr/local
(Please note the –enable-shared parameter, do not omit, otherwise may compile the. so cannot load)
Make
At this time, MagickWandForPHP-1.0.4 will produce modules folder, which is what we need magickwand.so
Copy it to the Extension_dir configured in php.ini.
Then modify the php.ini to increase the extension=magickwand.so
Restart Apache
There should be a magickwand option in the Phpinfo () page.
After 2 attempts, I finally succeeded.
Other questions:
If Magickwand executes./configure, checking for Magicksetimagetickspersecond In-lwand appears ... No error, perhaps you now have two versions of ImageMagick installed, and the default version is lower than ImageMagick-6.3.3
You can view its version with the Magick-config–version command.
Usually the system has the RPM package installed, and the solution is to uninstall the Libimagemagick package:
Rpm-qa | grep ' ImageMagick '
Then Rpm-e Libimagemagick ....