class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
On PHP 5.3.14 (MAMP PRO) calling finfo_open(FILEINFO_MIME, $path); kills the script with no output if $path = '/usr/share/file/magic'; (class.upload.php line 2771) is used. Setting $path = null (forcing a default fallback value) solves the problem.
https://github.com/paulds/class.upload/tree/development
Regards,
Paul