Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have installed ImageMagick on my OSX Lion. When running from the console everything works fine. But when I'm trying to run 'convert -version' from a php script :

<?
exec('convert -version', $imgkOut);
if (empty($imgkOut)){
    echo '{"success": false, "msg": "ImageMagick not installed or not reachable."}';
    return 0;
}
?>

I get this error message printed. So this looks like a typical permissions problem as I remember having a similar one with phantomJs and Pdftk some time ago. I've solved it by simply adding www user to admins group (as it's not production but my development environment). Still it doesn't work for imagemagick. How can I check/change permissions for www user to be able to run this command. Or maybe it's something completely different ?

I'm using the built-in apache and php5 installations.

share|improve this question
    
looks like this solved it. thanks –  mike_hornbeck Aug 22 '12 at 16:09

1 Answer 1

up vote 1 down vote accepted

Try using the full path to the convert executable in your php script:

<?
exec('/usr/bin/convert -version', $imgkOut);
if (empty($imgkOut)){
    echo '{"success": false, "msg": "ImageMagick not installed or not reachable."}';
    return 0;
}
?>
share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.