Reply to Mime detection fails when Suhosin is enabled

Mime detection fails when Suhosin is enabled new!
by Lefteris Kavadas, 12 years, 11 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.Reply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important