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?

link|improve this question
feedback

1 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.

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.

link|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
show 1 more comment
feedback

Your Answer

 
or
required, but never shown