Page 1 of 1

Having problems with ImageMagick via php exec()

Posted: 2007-03-28T17:38:11-07:00
by kpettit
Any help would be appreciated...

If I run this command via a shell command it works.

Code: Select all

convert preview.jpg preview.png
When I call it via php it does nothing.

Code: Select all

<?php
$convert = "convert preview.jpg preview.png";
exec($convert);
?>

Platform: Mac OSX 10.4.5
PHP5
Latest version of ImageMagic

Thanks Ken...

Re: Having problems with ImageMagick via php exec()

Posted: 2007-03-28T19:12:57-07:00
by anthony
Check environment. Is 'convert' on the comamnnd path. Are you in the right directory, can the web server (which is usally running as nobody or apache) write to the directory or file you are trying to create or update.

For more see IM Examples feedback, PHP
http://www.imagemagick.org/Usage/feedback/#php