I recently encountered this obscure error when trying to run an external program using PHP (which was bundled with MAMP Pro) on Mac OS X:
dyld: Symbol not found: __cg_jpeg_resync_to_restart Referenced from: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib Expected in: /Applications/MAMP/Library/lib/libJPEG.dylib in /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib
Oddly, other commands execute fine from PHP using shell_exec(). Even more strangely, the external program ran fine when executed from a PHP command-line script, just not from MAMP’s bundled version of Apache!
Thanks to this tidbit from the PrinceXML forums, the solution was easy:
MAMP changes the environment variable
$DYLD_LIBRARY_PATH. Check the file:/Applications/MAMP/Library/bin/envvarsand try out if commenting out the two uncommented lines will work for you.
Thank you for your solution! I’ve been having problems compiling LESS on-the-fly inside of MAMP, and this indeed fixed the problem. Cheers!
That works…Thanks a lot for the fix!!
Hi, I’ve tried what you said, but Apache doesn’t start since then. Ay suggestion?
Thank you!
Check your Apache error log and see why it didn’t start.
Thanks a lot, now it works
Wish I had found this post hours ago! Thanks!
Worked!!!! Thanks a lot…..God bless you….
I’m experiencing the same problem. Sadly, changing the envvars file does nothing for me, the same DYLD_LIBRARY_PATH is still set in MAMP (2.0.5) on startup.
OMG thank you for posting this! This saved my life!