0

I have installed ImageMagick (http://www.imagemagick.org/script/download.php) on a linux server (following the installation steps) - i which to migrate a php application on this new server.

$which mogrify

returns

/usr/local/bin/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).

Andreas
  • 123
  • 6

2 Answers2

1

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.

Sam Halicke
  • 6,222
  • 1
  • 25
  • 35
0

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?

Jure1873
  • 3,702
  • 1
  • 22
  • 28
  • 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