Forums / Setup & design / Disable imagemagick

Disable imagemagick

Author Message

Guglielmo Celata

Tuesday 18 May 2004 9:16:39 am

I gave a look in the forum, it seems pretty easy to disable ImageMagick, but I just couldn't.
I am trying to disable it, in order to use the GD library (on a production server I tend to switch the paranoic mode on and don't want php to use system() too much).

I tried modifying my settings/override/image.ini.append.php this way:

 UseConvert=false
 UseGD=true
 
 [GDSettings]
 # If set to true more advanced functionality will be available
 # which is present in GD2. This requires GD2 to be compiled in
 # the PHP module.
 HasGD2=true
 
 # commented out in order to leave only GD
 #[ShellSettings]
 #ConvertPath=/usr/X11R6/bin
 #ConvertExecutable=convert

then I cleaned all the caches,
but the system plain ignores it.

As a matter of fact, renaming /usr/bin/convert to /usr/bin/convert_foo, leads to this warning in ez debugger:

 Failed executing: 
  convert '-geometry' '600x600>'
  'var/[site]/storage/images/[path]/5455-2-eng-GB/[file].gif'
  'GIF:var/[site]/storage/images/[path]/5455-2-eng-GB/[file].gif', Error: , Return: 127

and the image is NOT displayed.

Guglielmo

Guglielmo Celata

Tuesday 18 May 2004 10:40:20 am

I'll answer myself, hoping to be helpful.

 [ImageMagick]
 IsEnabled=false

This snippet, at the top of settings/override/image.ini.append[.php] will do the job.

The following rules may also be helpful (all gif images will be converted into png).
GIF is patented and should no longer be used.

 [Rules]
 DefaultRule=image/jpeg;gd
 Rules[]=image/jpeg;image/jpeg;gd
 Rules[]=image/png;image/png;gd
 Rules[]=image/gif;image/png;gd
 Rules[]=image/xpm;image/png;gd