Hi,
I see in modules/gallery/helpers/graphics.php that G3 relies on exec('which ...') and doesn't give the admin a chance to manually input the location of imagemagick, or try to exec convert in the dirs in PATH. That's a problem for me: my host (godaddy, fairly popular) doesn't support 'which' (doesn't exist). But it does have imagemagick installed (in /usr/local/bin). So it is frustrating that I can't enter the paths myself.
I'll modify graphics.php and movies.php manually for now, but can you guys consider adding support for attempting to exec convert in each directory in the PATH, or something similar?
thx
X
Posts: 22879
A properly configured server will allow for common php command to be used.
See if editing the graphics_toolkit_path under
admin -> settings -> advanced
allows you to add the path that php can't find due to server restrictions.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 11
Hi floridave,
It's not the path that's the problem (in my case, imagemagick is in /usr/local/bin). The problem is that graphics.php has a hard dependency on `which`, and my host doesn't support which. Take a look at these lines in graphics.php:
// ImageMagick
$path = exec("which convert");
$toolkits->imagemagick->name = "ImageMagick";
if ($path) {
if (@is_file($path)) {
preg_match('/Version: \S+ (\S+)/', `convert -v`, $matches);
$version = $matches[1];
There's a dependency here on "which". Which, doesn't exist on my server. I think this should be written in a way that first tries to execute convert in the paths in PATH env var... rather than rely on which.
Your thoughts?
x
Posts: 16501
Are you the xaphod in #gallery? If so, pop in there and ask Bharat what the reasoning is behind that.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 11
Well why not just give the admin a chance to manually input the locations to files if executing `which` doesn't return success?
Posts: 16501
That's not going to happen in the screen where you can select the image toolkit.
As Dave pointed out you can specify the path under Advanced Settings.
I've left a note for one of the developers to get an answer as to why it's being done this way. I don't know if this is a bug, if there are other reasons or this scenario just wasn't thought about.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 16501
The framework we use, Kohana, uses 'which' in it's drivers and it was mirrored for this functionality as well.
That's the logic and reasoning behind it. Check out /system/libraries/drivers/Image/GraphicsMagick.php and ImageMagick.php
So at NoDaddy, unless you can convince them to give customer service and not disable that function, you'll be stuck with using GD or finding a proper host.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 16501
Looks like this was a bug and has been fixed. Gallery should pickup and use the path you specify in Advanced Settings:
http://github.com/gallery/gallery3/commit/294215258a30bb0e99701655ce2b69271446a867
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here