PHP ImageMagick convert doesn't work under OSX -
i have apache web server under osx , installed , configured imagemagick. if seek execute imagemagick command terminal, works fine, if seek exec or shell_exec php, doesn't work.
that do: set environment variable:
apache_setenv("path", "/etc/imagemagick-6.8.1/bin:".apache_getenv("path"));
and seek execute command:
exec('convert -version', $imgkout);
the $imgkout array empty.
i tried set both paths: 'convert ...' , '/etc/imagemagick-6.8.1/bin/convert ...' - nil helps.
in apache log file found these errors:
sh: convert: command not found
for first case, , this:
sh: /etc/imagemagick-6.8.1/bin/convert: permission denied
for second.
what do wrong?
did see http://php.net/manual/en/book.imagick.php ? try install imagemagick macports - http://www.macports.org/ports.php?by=name&substr=imagemagick check exec convert (maybe file hasnt +x flag? chmod +x convert)
php imagemagick shell-exec
No comments:
Post a Comment