Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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 ( => mysitedo)

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

share|improve this answer

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.

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>";

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.

share|improve this answer
hmm,, I just get a blank screen when I run the test.php – user57878 Oct 22 '10 at 2: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? – user57878 Oct 22 '10 at 3: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 <?php instead of just <? – DerfK Oct 22 '10 at 3:26
The php is running fine as the text messageI have after the system function prints to the screen just fine. – user57878 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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.