I had a strange problem with php 5.3.6 and ImageMagick (command line) using MAMP (and Macports too .. I tried both) on OS X.
When I run the authentication command from the CLI, it works fine. But when I run the same command using exec() , it returns a code of value 5 , and in the apache error logs I have:
dyld: library not loaded: /opt/local/lib/libfreetype.6.dylib
Link from: / opt / local / bin / ident Reason: Incompatible library version: authentication requires version 14.0.0 or later, but libfreetype.6.dylib provides version 13.0.0
eg. Cli command: /opt/local/bin/identify /Users/leonardteo/Documents/1.jpg
This works great when executed from the command line. When executed from PHP:
exec("/opt/local/bin/identify /Users/leonardteo/Documents/1.jpg", $output, $return);
$return 5
$output nothing
Checking the apache logs gives the above problem with libfreetype.
I installed ImageMagick using Macports. I also tried to create a manual assembly from the source and run the identifier from /usr/local/bin/identify , and I get the same result. I also tried to run PHP from Macports instead of MAMP, and I get the same result.
Can someone really help shed light on this?
Leonard teo
source share