Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save haoshuncheng/51caabe0d0730fcc8e1fd09923755ce3 to your computer and use it in GitHub Desktop.
Save haoshuncheng/51caabe0d0730fcc8e1fd09923755ce3 to your computer and use it in GitHub Desktop.
Installing Imagick with PHP 7

1. Download the phpseven branch of the imagick repository

git clone https://github.com/mkoppanen/imagick.git imagick

2. phpize for target PHP version

cd imagick && /path/to/php7/bin/phpize && ./configure && make && make install

3. Enable the extension for your PHP version

echo "extension=imagick.so" >> /path/to/php.ini

4. Restart PHP / Apache (I run php-fpm)

For php-fpm:

service php5-fpm restart

For apache, something like:

sudo apache2ctl graceful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment