Copy lang ito:
You should be able to set up ImageMagick with imagick as follows. In this example, I assume "htdocs" for the webapp name. I also assume that you are installing for php5.4:
Installing ImageMagick
mkdir -p $HOME/src
cd $HOME/src
wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz
tar xzvf ImageMagick.tar.gz
cd ImageMagick-6.8.5-8
./configure --prefix=$HOME --without-perl
make
make install
echo "export PATH=$HOME/bin:\$PATH" >> .bash_profile
source .bash_profile
hash -r
Installing imagick PECL extension
mkdir -p $HOME/src
cd $HOME/src
wget
You do not have permission to view the full content of this post.
Log in or register now.
tar xzvf imagick-3.1.0RC2.tgz
cd imagick-3.1.0RC2
phpize54
ln -s $HOME/include/ImageMagick-6 $HOME/include/ImageMagick # configure script wants it here
./configure --with-php-config=/usr/local/bin/php54-config --with-imagick=$HOME
make
mkdir -p $HOME/php54-exts
cp modules/imagick.so $HOME/php54-exts/
ln -s /usr/local/lib/php54/extensions/no-debug-non-zts-20100525/* $HOME/php54-exts/
echo "extension_dir = $HOME/php54-exts" >> $HOME/webapps/htdocs/php.ini
echo "extension = imagick.so" >> $HOME/webapps/htdocs/php.ini
cd $HOME/php54-exts
wget '
You do not have permission to view the full content of this post.
Log in or register now.' # This is a 64-bit binary. For 32-bit binary, wget '
You do not have permission to view the full content of this post.
Log in or register now.' instead
chmod 755 patchelf
./patchelf --set-rpath "$HOME/lib:" imagick.so
ln -s $HOME/lib/libMagickWand-6.Q16.so.1.0.0 $HOME/lib/libMagickWand.so.2
ln -s $HOME/lib/libMagickCore-6.Q16.so.1.0.0 $HOME/lib/libMagickCore.so.2
A final note: this is a bit of a häçk. libMagickWand-6.Q16.so.1.0.0 is not libMagickWand.so.2, and libMagickCore-6.Q16.so.1.0.0 is not libMagickCore.so.2, but symlinking as above was the only way I was able to get phpinfo() to show ImageMagick 6.8.5-8. The imagick.so file explicitly is looking for files named "libMagickWand.so.2" and "libMagickCore.so.2", and if they are not provided, the system versions will be used. You can see the dynamic linking information using the command "ldd $HOME/php54-exts/imagick.so".
As far as I can tell, this still functions correctly, for example with the
You do not have permission to view the full content of this post.
Log in or register now. and
You do not have permission to view the full content of this post.
Log in or register now., but no guarantees can be made.
Hope that helps!