[ansel] The convert command doesn't work with Bourne shells

Laurent Blume laurent+ansel at elanor.org
Sat Jul 13 09:33:00 UTC 2013


On 2013-07-13 11:10 AM, Laurent Blume wrote:
> Ah, thanks, indeed they are!
> 
> So that begs the question, why aren't the temporary files deleted once
> they're put in place? I got confused because they're still present, else
> I'd have looked harder for hidden directories :-)

Ah hmm, I thought it was unrelated,I was going to bring this up next,
but actually, maybe there's a link.

On Solaris, there's a bug when calling the convert command:

In Apache error-log:
sh: -gravity: introuvable
convert: l'option a besoin d'un argument `-thumbnail' @
error/convert.c/ConvertImageCommand/2753.

In PHP's log:
Jul 13 11:13:33 server HORDE: [ID 702911 user.emerg] [ansel] Error
running command: /opt/bin/convert  "/var/tmp/imgQ7aGmh"'[0]' -thumbnail
50x50^ -gravity center -extent 50x50 +profile "*"
png:"/var/tmp/imgR7aGmh" 2>&1
Jul 13 11:13:33 server [pid 3684 on line 1164 of
"/www/webmail/horde/ansel/lib/Image.php"]

That one is a classical Solaris <= 10 problem, where /bin/sh is not bash
nor POSIX, but actual Bourne from 20+ years ago, when ^ was the
equivalent of |.

So the ^ here should be escaped with \ (that will work for all shell) or
a different shell chosen.

Thanks,

Laurent


More information about the ansel mailing list