See the following link:
http://www.daniweb.com/forums/thread116143.html
And here's my solution (I uninstalled IM and reinstalled it into my home directory, that's why the paths are different from what I listed before. But this has nothing to do with what the problem was. I also changed the user from www to www2 - I added the www2 user and made a change in the httpd.conf file - but again this was part of troubleshooting and had nothing to do with the problem):
Code: Select all
putenv("MAGICK_HOME=" .$_ENV["MAGICK_HOME"]. "/Users/shafique/ImageMagick-6.4.5/");
exec('echo $MAGICK_HOME',$array);
putenv("PATH=" .$_ENV["PATH"]. "/Users/shafique/ImageMagick-6.4.5/bin");
exec('echo $PATH',$array);
putenv("DYLD_LIBRARY_PATH=" .$_ENV["DYLD_LIBRARY_PATH"]. "/Users/shafique/ImageMagick-6.4.5/lib");
exec('echo $DYLD_LIBRARY_PATH',$array);
echo "<br>".print_r($array)."<br>";
exec('/Users/shafique/ImageMagick-6.4.5/bin/convert /Users/www2/IMG_0041.JPG /Users/www2/41.png 2>&1', $array);
Code: Select all
exec( 'export $DYLD_LIBRARY_PATH="/Users/shafique/ImageMagick-6.4.5/lib" ',$array);
I hope this helps others!