Window10 install Imagick extension and configuration

1. Install ImageMagick

Download address:  http://www.imagemagick.org/download/binaries/ , you can download the latest version, for example  , install the software in .exe format.

The Path path will be installed by default, if not, you can configure it yourself.

Then, CMD command window -> input convert -version -> If the version information appears, the installation is successful.

 

2. Install the PHP extension

PHP extension Imagick download:  http://pecl.php.net/package/imagick , it is recommended to download the stable version 3.4.3, Note: 3.4 only supports 6.9 and below versions, so, if you follow 3.4, the first step can only follow 6.8 or 6.9

  

  According to your own PHP version information, select the appropriate extension to install:

  

  

 

 Copy and paste the php_imagick.dll into the extension directory ext folder in the PHP configuration environment, and copy and paste the rest of the files into the same level directory as the ext folder.

 Add extension=php_imagick.dll to the php.ini configuration file

 

 You need to  create a new system environment variable named MAGICK_HOME , the value is E:\your imagick path\modules\coders, this step is mainly used to locate the module of imagemagick, it is very important.

(Otherwise the number of supported image formats defaults to 0 and the image cannot be processed. ImageMagick number of supported formats: => 0 )

php extension debug command:

Run in cmd: php --ri imagick

 

 Restart the service!

phpinfo(); to view the relevant information, if the following extension appears, that means the installation of the extension configuration is successful, sometimes it may be necessary to restart the computer and refresh the path configuration.

  

 

By the way, I would like to mention the installation method of imagick in centos6.4:

*** ImageMagick download requires version 6.9 to use with imagick-3.4.3 ***

1. Install ImageMagick
http://soft.vpser.net/web/imagemagick/
wget http://soft.vpser.net/ web/imagemagick/ImageMagick-6.9.1-2.tar.gz
tar zxvf ImageMagick-6.9.1-2.tar.gz
tar xjf ImageMagick-7.0.5-7.tar.bz2 
cd ImageMagick-6.7.1-2/ ImageMagick-6.9.1-2.tar.gz
./configure --prefix=/usr/local/imagemagick --disable-openmp
make && make install
ldconfig

Test if ImageMagick works:
/usr/local/imagemagick/bin/ convert -version
execute: /usr/local/imagemagick/bin/convert logo: logo.gif Test whether ImageMagick can run normally.

2. Install the PHP extension: imagick

copy code
http://pecl.php.net/package/imagick
wget http://pecl.php.net/get/imagick-3.4.3.tgz
tar zxvf imagick-3.4.3.tgz
cd imagick-3.0.1/
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config --with-imagick=/usr/local/imagemagick
make && make install
ldconfig
vi /usr/local/php/etc/php.ini
copy code

 

Add to:

;add imagemagick extention, ********** johnson *******************
extension = "imagick.so"

 

restart lnmp

/root/lnmp reload
or lnmp restart

 

Uninstall IamgeMagick

yum remove ImageMagick
yum install ImageMagick-devel

 Reprinted from: https://www.cnblogs.com/sanplit/p/7818635.html

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325121377&siteId=291194637