G3B1 - ImageMagick Not Found

exDfg

Joined: 2009-06-09
Posts: 39
Posted: Tue, 2009-06-09 11:56

Hello,

First of all congratulations on your new package. It looks really great.

I have just downloaded the latest code and the only problem I've noticed so far is that ImageMagick isnt clickable (ImageMagick is not available on your system.). GD is working without any problems.

I use a Linux Account on GoDaddy and I've been using ImageMagick version 6 with gallery 2.3 with no problems. The path to its binaries is /usr/local/bin and I already tried to manually add that path to graphics_toolkit_path variable in order to manually make it available but I had not luck.

I wonder why it isnt available and how can we proceed to fix it.

Thanks for your time, attention and effort.

BTW: I noticed somebody posted something similar here (http://gallery.menalto.com/gallery_3.0_beta_1_feedback) but its really confusing there because many issues are being discussed at the same time and I didnt understand the answer you gave him:

Quote:
@kellym: It sounds like /usr/local/bin isn't in your PHP's path. To verify, try running "which convert" from a shell. That turns up /usr/local/bin, right? Now try: <? system("which convert"); ?> and when you open that in a browser, it should tell you the same path. If not, you need to configure the path for your Apache user so that Gallery can find your binaries.

I thought it would be better to start a new topic also so people with the same issue can easely find it.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2009-06-12 08:56

I added some code to detect binaries in /usr/local/bin -- try the latest code and see if that fixes it for you.
---
Problems? Check gallery3/var/logs before you post! and file bugs here!
Latest zip: http://github.com/gallery/gallery3/zipball/master
Latest git: http://codex.gallery2.org/Gallery:Using_Git

 
exDfg

Joined: 2009-06-09
Posts: 39
Posted: Fri, 2009-06-12 11:28

Ok, I will let you know when I get home.
Thanks a lot.

 
exDfg

Joined: 2009-06-09
Posts: 39
Posted: Fri, 2009-06-12 19:36

Hello, I've downloaded it today and I still get the same behavior.

Thanks for your time.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2009-06-13 01:33

Can youg ive it one more try? I think I forgot to push the fix properly last time around. If it still doesn't work then I'll dig into it some more.
---
Problems? Check gallery3/var/logs before you post! and file bugs here!
Latest zip: http://github.com/gallery/gallery3/zipball/master
Latest git: http://codex.gallery2.org/Gallery:Using_Git

 
exDfg

Joined: 2009-06-09
Posts: 39
Posted: Sat, 2009-06-13 02:10

Hello,

I've just downloaded and tried with no luck.

Thanks once more for your attention.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2009-06-14 00:12

Darn. Ok, let's try some stuff. Put the following into a .php file and open it in your web browser:

pre>
<?
putenv("PATH=" . getenv("PATH") . ":/usr/local/bin");
echo getenv("PATH"), "\n";
print "<hr>\n";
system("which convert");

That forces /usr/local/bin into your path and runs "which" to find it. On my system, this finds anything I've got in /usr/local/bin. If that doesn't work, please check your Apache error logs too.
---
Problems? Check gallery3/var/logs before you post! and file bugs here!
Latest code/upgrading: http://codex.gallery2.org/Gallery3:Upgrading
Latest git: http://codex.gallery2.org/Gallery:Using_Git

 
exDfg

Joined: 2009-06-09
Posts: 39
Posted: Sun, 2009-06-14 00:29

Hello,

Thank you for your time once more.

This is what I get on that page: pre> /bin:/usr/bin:/usr/local/bin:/usr/local/bin

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2009-06-14 01:53

Ok so /usr/local/bin was already in your path. Are you sure that the convert binary is in /usr/local/bin? What do you get with this in a php file:

<? system("ls -al /usr/local/bin"); ?>

And you didn't mention what was in your error logs. Anything there?
---
Problems? Check gallery3/var/logs before you post! and file bugs here!
Latest code/upgrading: http://codex.gallery2.org/Gallery3:Upgrading
Latest git: http://codex.gallery2.org/Gallery:Using_Git

 
exDfg

Joined: 2009-06-09
Posts: 39
Posted: Sun, 2009-06-14 02:07

I got this:

total 4032 drwxr-xr-x 2 0 0 4096 Mar 18 11:42 . drwxr-xr-x 18 0 0 4096 Jan 22 18:49 .. -rwxr-xr-x 1 0 0 6923 Feb 25 22:27 animate -rwxr-xr-x 1 0 0 11552 Feb 18 2006 cgi-fcgi -rwxr-xr-x 1 0 0 7264 Feb 25 22:27 compare -rwxr-xr-x 1 0 0 6941 Feb 25 22:27 composite -rwxr-xr-x 1 0 0 6923 Feb 25 22:27 conjure -rwxr-xr-x 1 0 0 6923 Feb 25 22:27 convert -rwxr-xr-x 1 0 0 6923 Feb 25 22:27 display -rwxr-xr-x 1 0 0 3882 Jan 2 2008 erb -rwxr-xr-x 1 0 0 10844 Jan 24 2005 freebcp -rwxr-xr-x 1 0 0 788 Mar 4 15:04 gem -rwxr-xr-x 1 0 0 7281 Feb 25 22:27 identify -rwxr-xr-x 1 0 0 6922 Feb 25 22:27 import -rwxr-xr-x 1 0 0 356 Jan 2 2008 irb -rwxr-xr-x 1 0 0 6923 Feb 25 22:27 mogrify -rwxr-xr-x 1 0 0 6923 Feb 25 22:27 montage -rwxr-xr-x 1 0 0 774 Dec 22 11:30 pear -rwxr-xr-x 1 0 0 795 Dec 22 11:30 peardev -rwxr-xr-x 1 0 0 711 Dec 22 11:30 pecl -rwxr-xr-x 1 0 0 3068848 Dec 22 11:30 php -rwxr-xr-x 1 0 0 896 Dec 22 11:30 php-config -rwxr-xr-x 1 0 0 4010 Dec 22 11:30 phpize -rwxr-xr-x 1 0 0 1541 Jan 2 2008 rdoc -rwxr-xr-x 1 0 0 1491 Jan 2 2008 ri -rwxr-xr-x 1 0 0 761829 Jan 2 2008 ruby -rwxr-xr-x 1 0 0 153 Jan 2 2008 testrb -rwxr-xr-x 1 0 0 10260 Jan 24 2005 tsql

As for the path, I am sure it is there for 2 reasons:
- first of all it works perfectly on 2.3 when I set that path
- I checked the faq of godaddy and it says its there (http://help.godaddy.com/article/209)

As for the error logs, I didnt mention because the folder for logs is empty.

Thanks for your attention once more.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2009-06-14 02:16

That's weird. I wonder why system("which convert") isn't working when /usr/local/bin is clearly in your path, and it appears to be readable and executable. If you go to Admin > Settings > Advanced and set the graphics_toolkit to "imagemagick" and the graphics_toolkit_path to "/usr/local/bin" does it work?
---
Problems? Check gallery3/var/logs before you post! and file bugs here!
Latest code/upgrading: http://codex.gallery2.org/Gallery3:Upgrading
Latest git: http://codex.gallery2.org/Gallery:Using_Git

 
exDfg

Joined: 2009-06-09
Posts: 39
Posted: Sun, 2009-06-14 02:35

Hello,

If I do that and check the Graphics page after that it says that ImageMagick is the Active Toolkit but is grayed out and still displays the message "ImageMagick is not available on your system."

Should I run any other kind of tests to know if its working? If so, please let me know.

Thank you.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2009-06-14 14:49

Sorry, I have no idea what's going wrong there. As far as I can tell, it should be working. Any chance I can get direct access to your server to inspect it directly?
---
Problems? Check gallery3/var/logs before you post! and file bugs here!
Latest code/upgrading: http://codex.gallery2.org/Gallery3:Upgrading
Latest git: http://codex.gallery2.org/Gallery:Using_Git

 
exDfg

Joined: 2009-06-09
Posts: 39
Posted: Sun, 2009-06-14 15:29

Hey,

I am sorry but I cant provide that because my gallery is hosted on a friend's account and I dont think he would allow me to provide access. If he does I will let you know but I wouldnt keep my hopes high.

As a suggestion, can you compare the old code with the new one and see how each one handles it in order to detect the problem since the old code can easely detect it with no problems and both are running on the same server.

Thank you for your time.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2009-06-14 15:33

The old and new code are radically different. The new code works for most people, so it's not practical for me to do as you suggest. Perhaps somebody else can reproduce this problem and we can get more debugging information to help track it down.
---
Problems? Check gallery3/var/logs before you post! and file bugs here!
Latest code/upgrading: http://codex.gallery2.org/Gallery3:Upgrading
Latest git: http://codex.gallery2.org/Gallery:Using_Git

 
exDfg

Joined: 2009-06-09
Posts: 39
Posted: Sun, 2009-06-14 15:42

Oh, I see.
Could you explain me why you think its not working (basically what can be happening for it not to load it correctly) so I can see if I can try to debug a little on my free time?
See you.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2009-06-14 19:22

I'm not really sure. Best guess I have right now is that the "which" command isn't working when executed using system(). I'd start there to make sure that it actually works, and if doesn't, try to figure out why.
---
Problems? Check gallery3/var/logs before you post! and file bugs here!
Latest code/upgrading: http://codex.gallery2.org/Gallery3:Upgrading
Latest git: http://codex.gallery2.org/Gallery:Using_Git

 
exDfg

Joined: 2009-06-09
Posts: 39
Posted: Sun, 2009-06-14 19:45

Ok. I will try to have a look. If I find anything I will post here. I will also keep updating the code and if an update fixes it I will let you know. Also, if you change something that could interfere with this, please let me know.

Thanks for all your time and patience.

 
exDfg

Joined: 2009-06-09
Posts: 39
Posted: Mon, 2009-06-15 02:57

Hey, I forgot to ask: which files are used in order for imagemagick to work? In other words, what are the files that make it work/call it?

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2009-06-16 03:39

/usr/local/bin/convert is the main binary that it uses. /usr/local/bin/composite is the other one.
---
Problems? Check gallery3/var/logs before you post! and file bugs here!
Latest code/upgrading: http://codex.gallery2.org/Gallery3:Upgrading
Latest git: http://codex.gallery2.org/Gallery:Using_Git

 
exDfg

Joined: 2009-06-09
Posts: 39
Posted: Tue, 2009-06-16 10:02

Ok and what are the files on gallery that have the script that make the call work (where it checks that Imagemagick works and checks the path etc etc)?

Thanks

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2009-06-16 20:26

system/libraries/drivers/Image/ImageMagick.php
---
Problems: Check gallery3/var/logs first!
file a bug or feature request | upgrade to the latest code | use git

 
exDfg

Joined: 2009-06-09
Posts: 39
Posted: Wed, 2009-06-17 22:34

Hello,

If I use

<?php
echo "<pre>";
system('which convert',$path); print_r($path); 
echo "</pre>";
?>

It gives me 127

And if I use

<?php
echo "<pre>";
system("type convert"); 
echo "</pre>";
?>

It gives me convert is /usr/bin/convert

So it seems to be working fine, isnt it?
What does your code should be giving me? (the system("which convert"))
Maybe we must check if its installed using another code?! For some reason the one you've chosen doesnt work?!

 
exDfg

Joined: 2009-06-09
Posts: 39
Posted: Wed, 2009-06-17 22:30

By the way, dont worry about the /usr/bin/convert. GoDaddy has it installed on /bin and /local/bin (the last one has the latest version)

 
exDfg

Joined: 2009-06-09
Posts: 39
Posted: Thu, 2009-06-18 03:26

I have more important findings. If I manually set the toolkit to imagemagick as you said and type my path correctly on advanced settings and try to manage the images it works perfectly. Then I tried to use a wrong path and I got a message on the log saying ImageMagick wasnt found. So, I am pretty sure that the problem is only on the way it is detecting the toolkit.

Thanks for your help and support.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Thu, 2009-06-18 19:36

"which convert" should return "/usr/bin/convert". I guess the question is: why is the "which" command failing on your system? Please ask your system administrators what's going on there.
---
Problems: Check gallery3/var/logs first!
file a bug or feature request | upgrade to the latest code | use git

 
christian.busch

Joined: 2007-08-20
Posts: 8
Posted: Mon, 2010-10-25 03:06

any news here ? I am trying this as of today and have scanned all posts...

in my galery3 git image magick is greyed out...

running godaddy grid

URl: http://the-busch-family.com/gallery3/
phpinfo: http://the-busch-family.com/gallery3/pwd.php

how can i fix this ?

 
mfoster711

Joined: 2005-03-06
Posts: 118
Posted: Mon, 2010-10-25 03:35

This is the same issue I am having.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2010-10-25 03:45

FAQ: Host specific issues the community has found

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
christian.busch

Joined: 2007-08-20
Posts: 8
Posted: Mon, 2010-10-25 13:39

I already checked the host specific issues and inserted the suggestions.
they didnt solve it...

here are my advanced settings:
gallery graphics_toolkit gd
gallery graphics_toolkit_path /usr/local/bin/

also tried other like /migralfo or something that was suggested but didnt.

here is my log:
<?php defined('SYSPATH') or die('No direct script access.'); ?>

2010-10-24 19:47:34 -07:00 --- error: File not found: var/thumbs/google_lego.gif?m=1287974850

 
amisme

Joined: 2010-10-25
Posts: 2
Posted: Mon, 2010-10-25 21:41

I don't know if this will help you, I am running Gallery3 on a FreeNAS box and have had the same problem with ImageMagick not being found. The problem came from the "which" command not being used correctly in the php script, so I hardcoded it to "/usr/bin/which" in files \helpers\graphics.php and \system\libraries\drivers\Image\ImageMagick.php.

This fixed my problem, but I need to make the change at each new release.
Software : Gallery 3.0 + php5 to 5.2.13. + lighttpd