Upload fine - no photo displayed. Using ImageMagick, convert not found

snalbansed

Joined: 2005-03-26
Posts: 3
Posted: Sun, 2009-06-14 23:18

Upload fine - no photo displayed. Using ImageMagick, convert not found

Line from var/log/
2009-06-14 21:38:04 +01:00 --- error: Caught exception rebuilding image: New Baby Photos
The ImageMagick directory specified does not contain a required program, convert.

Installation is on a hosted server, with no shell access. Using system("which convert"); in a php file reveals a path of /usr/bin/convert - I can't find imagemagick in this way, though Magick++-config and Magick-config are both listed in /usr/bin

The gallery itself tells me that 'ImageMagick is available in /usr/bin' and this is activated. I also have a choice of 'You have GD version bundled (2.0.34 compatible).', but not GraphicsMagick.

If I try to Rebuild Images using ImageMagick, the errors are written to the log and nothing changes. If I switch to GD and rebuild images, the progress bar never progresses.

Any ideas? Thanks. So far, Gallery3 is looking great, I just need to be able to see some photos!

Ed

 
bharat
bharat's picture

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

Do you have access to your Apache error logs? I'm wondering if you're hitting an open_basedir restriction.
Try putting the following in a php file:

<?
print_r(array(realpath("/usr/bin/convert"), is_file(realpath("/usr/bin/convert"))));
?>

That'll mimick the tests in system/libraries/drivers/Image/ImageMagick.php (on line 45)
---
Problems: Check gallery3/var/logs first!
file a bug or feature request | upgrade to the latest code | use git

 
snalbansed

Joined: 2005-03-26
Posts: 3
Posted: Tue, 2009-06-16 08:05

Looks like you've hit the nail on the head! I don't have access to any useful Apache logs, but the php produced this:

Quote:
Warning: realpath() [function.realpath]: open_basedir restriction in effect. File(/usr/bin/convert) is not within the allowed path(s): (/home/hill/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/hill/public_html/test.php on line 17

And then the same again but followed by

Quote:
Array ( [0] => [1] => )

As you can probably guess, hill is the username on this account.

Next question then is, what do I do about it?

Thanks.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2009-06-16 18:55

At this point you need to talk to your system administrator and ask them to add /usr/bin to the open_basedir setting for you.
---
Problems: Check gallery3/var/logs first!
file a bug or feature request | upgrade to the latest code | use git

 
snalbansed

Joined: 2005-03-26
Posts: 3
Posted: Wed, 2009-06-17 11:04

Thanks bharat

The hosting provider has lifter the open_basedir restriction for the account in question.

Ed

 
bharat
bharat's picture

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

Awesome.
---
Problems: Check gallery3/var/logs first!
file a bug or feature request | upgrade to the latest code | use git