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 have installed ImageMagick ( on a linux server (following the installation steps) - i which to migrate a php application on this new server.

$which mogrify



Although mogrify CAN be called from the shell it cannot be found from a server side script (php).

The script contains a system([args]) function which executes the programm [args].

So system('mogrify --someoptions') does nothing at all.

Any ideas on what is wrong? Setup of imagemagick or problem from the php script?

NOTE: The same script executes succesfully on an existing server. On the new server the call to mogrify does nothing at all (permissions and settings are the same).

share|improve this question
What platforms? – Ignacio Vazquez-Abrams Nov 16 '10 at 16:03
centos 5.x distro – Andreas Nov 16 '10 at 16:12

Use the full path instead of just the binary name. I would imagine that /usr/local is not in the $PATH of the user running PHP.

/usr/local/bin/mogrify, etc.

share|improve this answer

by settings you mean php settings? PHP Safe mode is off? What if you use the full path to mogrify? (system('/usr/local/bin/mogrify --someoptions') Anything in the php/apache error logs?

share|improve this answer
can't make changes easily...hundred of files and many places where the call is issued. I'll try this if everything else fails. – Andreas Nov 16 '10 at 16:07

Your Answer


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.