Having problems with ImageMagick via php exec()

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
kpettit

Having problems with ImageMagick via php exec()

Post 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...
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Having problems with ImageMagick via php exec()

Post 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
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply