ImageMagick
From TYPO3Wiki
<< Back to Administrators page
Please note in the Discussion page what you change!
This document helps you to correctly install
ImageMagick or use GraphicsMagick instead of it.
Since the branch of GraphicsMagick from ImageMagick, many improvements have been made by many authors using an open development model. You should therefore consider to use GraphicsMagick instead of ImageMagick.
Contents |
Finding
You can usually get a rpm package of ImageMagick for your LINUX distribution. Consult your LINUX documents how to install it.
Installing
rpm -i image-magick.rpm
Now you shall verify if everything has been built correctly.
/usr/local/php/bin # rpm -ql ImageMagick | grep /usr/bin /usr/bin/animate /usr/bin/compare /usr/bin/composite /usr/bin/conjure /usr/bin/convert /usr/bin/display /usr/bin/identify /usr/bin/import /usr/bin/mogrify /usr/bin/montage /usr/bin/xtp
If you want to allow only executable files from /usr/local/php/bin for PHP applications, then you have to copy the files from /usr/bin or /usr/local/bin (see result from above) into /usr/local/php/bin. Otherwise you skip the following 2 steps.
/usr/local # mkdir php /usr/local # cd php /usr/local/php # mkir bin /usr/local/php # cd bin /usr/local/php/bin # cp /usr/bin/animate . /usr/local/php/bin # cp /usr/bin/compare . ... /usr/local/php/bin # cp /usr/bin/xtp .
Edit the php.ini file for the allowed include and executable file directories outside of the apache document root folder.
safe_mode_include_dir = /usr/local/php/bin safe_mode_exec_dir = /usr/local/php/bin
Now decide if you want to use the group id security mode with PHP. Then you must do these steps: php.ini:
; ; Safe Mode ; safe_mode = On
; By default, Safe Mode does a UID compare check when ; opening files. If you want to relax this to a GID compare, ; then turn on safe_mode_gid. safe_mode_gid = On
/usr/local/php/bin # chgrp www * /usr/local/php/bin # ls -l total 112 -rwxr-xr-x 1 root www 7296 Jan 25 14:09 animate -rwxr-xr-x 1 root www 7376 Jan 25 14:09 compare -rwxr-xr-x 1 root www 7296 Jan 25 14:09 composite -rwxr-xr-x 1 root www 7296 Jan 25 14:09 conjure -rwxr-xr-x 1 root www 7296 Jan 25 14:09 convert -rwxr-xr-x 1 root www 7296 Jan 25 14:09 display -rwxr-xr-x 1 root www 7392 Jan 25 14:09 identify -rwxr-xr-x 1 root www 7296 Jan 25 14:09 import -rwxr-xr-x 1 root www 7296 Jan 25 14:09 mogrify -rwxr-xr-x 1 root www 7296 Jan 25 14:09 montage -rwxr-xr-x 1 root www 32344 Jan 25 14:10 xtp
PHP Configuration
In /etc/php5/apache2/php.ini you must set
safe_mode_exec_dir = /usr/local/php/bin
if you use the recommended safe_mode.
Restart the apache:
# /etc/init.d/apache2 restart
Using with TYPO3
See the page 1 of the install tool and enter the path /usr/local/php/bin as the patch to search for ImageMagick.
You shall get this result shown in the Basic Configuration of the Install Tool.
Then you must also activate the use of ImageMagick under
5: All Configuration
[im] Boolean. Enables the use of IM. [GFX][im] = 1 [im_path] Path to the IM tools 'convert', 'combine', 'identify'. Version 4.2.9 of ImageMagick is highly recommended due to features and speed! [GFX][im_path] = /usr/local/php/bin

