I have an apache web server under OSX and an installed and configured ImageMagick. If I try to execute some ImageMagick command from the terminal, it works fine, but if I try to do that with exec or shell_exec from PHP, it doesn't work.
That is what I do: I set the environment variable:
apache_setenv("PATH", "/etc/ImageMagick-6.8.1/bin:".apache_getenv("PATH"));
and try to execute some command:
exec('convert -version', $imgkOut);
the $imgkOut array is always empty.
I tried to set both paths: 'convert ...' and '/etc/ImageMagick-6.8.1/bin/convert ...' - nothing helps.
In the apache log file I found these errors:
sh: convert: command not found
for the first case, and this:
sh: /etc/ImageMagick-6.8.1/bin/convert: Permission denied
for the second.
What do I do wrong?