I know mime_content_type() is deprecated, but it seemed to me the alternative is worse at the moment. Finfo
seems to require adding files and changing ini directions on windows; I don't want to require this for the script I am making.
I need to find the mimetype of files, but when calling mime_content_type($filename)
on windows it fails. mime_magic.magicfile points to the correct file, but when enabling mime_magic.debug in the ini file, I get this error message:
Warning: mime_content_type()[http://www.php.net/mime_magic]: mime_magic not initialized in C:\xampp\htdocs\test.php on line 2
I am not sure if that is a problem or if it still happens when I disable the debugging and it just doesn't tell me.
I checked, and extension=php_mime_magic.dll
is enabled in the ini file and httpd.conf specifies
LoadModule mime_module modules/mod_mime.so
#LoadModule mime_magic_module modules/mod_mime_magic.so
I am using XAMPP 1.6.5.