0

I just signed up with greengeeks.

I have a drupal install (6.19) on my public_html directory. The ImageMagic Toolkit can't find the binary - the error I get is "the path /usr/bin/convert" does not exist. when I use a terminal and do 'which convert' it shows /usr/bin/convert

also, I have a second drupal install in an addon domain - it's home directory is above the public_html directory (in a directory called '/home/myusername/addons/seconddomain')

The drupal install in the addon domain finds the imagemagick binary just fine.

I am at a total loss as to why the original install cannot find the binary.

The tech support guys at greengeeks have no clue either.

Any ideas of things to try?

2 Answers2

1

I know this is a really old thread but that's how I managed to fix that, writing that down here since it is the most relevant thread that appears on Google and probably I will run on that problem again. This applies to VPS solutions since you need ssh and root access to your server.

Greengeeks doesn't come with ImageMagick installed, once you are logged in as root you can verify it by checking that /usr/bin/convert does not exists at all.

First you need to install ImageMagick and all its dependencies using Yum, donwloading the binaries or the RPM package from the ImageMagick website does not work at all.

sudo yum install ImageMagick

Do all the confirmations that Yum asks to you with Y.

Once installed you need to move the ImageMagick binaries on your hosting directory since Greengeeks domains looks like they have open_basedir restriction enabled (cannot access system directories from the website)

On server console:

cd /home/accountusername/www/ 
mkdir bin
cd bin
for i in animate compare composite conjure convert display identify import mogrify montage; do cp /usr/bin/$i ./; done

This copies ImageMagick binaries to your local bin directory at the root of the website.

Replace accountusername with the actual account username of the domain you have created through WHM, generally it is the domain shortened to 8 characters (www.mysitedomain.com => mysitedo)

Then go on Drupal's settings and put /www/bin/convert as ImageMagick path.

MacK
  • 11
  • 1
0

Shot in the dark: your primary site could be chrooted to public_html (or somewhere else) and can't access anything outside of it. Throw a test.php in there containing

<? system("/bin/ls /"); ?>

Which should print out the contents of / (matching what you see when you type ls / from the shell. If that works, then try system("/usr/bin/convert"); If it doesn't work, then it should have a real error message we can take a look at.

Edit
Since system() returns an empty string and throws no error if the executable doesn't exist, we'll have to write our own ls. Start with

<? $dir=opendir("/bin");
   while (($file=readdir($dir))!==false) {
     echo $file."<br>";
   }
   closedir($dir);
?>

If /bin doesn't exist or doesn't match the contents of bin in the shell, then you seem to be chrooted to some directory. run it again with opendir("/"); and see what's there, then try to find the matching directory in the filesystem from the shell.

If /bin does exist (and the file listing contains ls) then something weirder is happening.

DerfK
  • 19,313
  • 2
  • 35
  • 51
  • hmm,, I just get a blank screen when I run the test.php –  Oct 22 '10 at 02:57
  • will the system command output to the screen? Also, the second drupal install is basically a subdomian. It is above the public_html but wouldn't that be chrooted as well? –  Oct 22 '10 at 03:02
  • The `system()` function outputs to the browser. View the blank page source and see if it's processing the php? If not, you probably have short tags turned off and need to start with ` – DerfK Oct 22 '10 at 03:26
  • The php is running fine as the text messageI have after the system function prints to the screen just fine. –  Oct 22 '10 at 20:32
  • Fascinating. If an executable doesn't exist, system() prints nothing and returns an empty string, not false. Well, that makes debugging hard. – DerfK Oct 22 '10 at 20:46
  • @letapjar See Edit, created our own ls in PHP to see what was going on. – DerfK Oct 22 '10 at 21:00