Reply to Mime detection fails when Suhosin is enabled
Mime detection fails when Suhosin is enabled new!
# Reply
by Lefteris Kavadas, 12 years, 6 months ago
When the class tries to detect the mime type using exec function there is an issue. When the server is using the Suhosin extension (http://www.hardened-php.net/suhosin/) then the function_exists('exec') returns true but the function (maybe, depending on Suhosin configuration) is actually disabled. This causes the class to break when calling the exec function. A simple solution is to add a check for Suhosin. In order to detect if Suhosin is installed you can call extension_loaded('suhosin'). If you want to take the disabled Suhosin functions you can use ini_get("suhosin.executor.func.blacklist"). It would be great to see a fix for this in a next release.