Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Imagemagick imagick and php7

pascalbaljet/imagick-3.4.0RC2-PHP7-forge.sh

sjelfull/Installing Imagick with PHP 7.md

#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
git clone https://github.com/mkoppanen/imagick.git /tmp/imagick
cd /tmp/imagick
git checkout phpseven
/usr/bin/phpize7.0
./configure
make
make install
cd /etc/php/mods-available
cat <<EOT >> imagick.ini
; configuration for php imagick module
extension=imagick.so
EOT
ln -s /etc/php/mods-available/imagick.ini /etc/php/7.0/cli/conf.d/20-imagick.ini
ln -s /etc/php/mods-available/imagick.ini /etc/php/7.0/fpm/conf.d/20-imagick.ini
rm -rf /tmp/imagick
service php7.0-fpm restart
service nginx restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.