 <p>You must have the mime_magic extension on. Check your php.ini and look in phpinfo(). By the way this function has been deprecated as the PECL extension <a href="http://www.php.net/manual/en/ref.fileinfo.php">Fileinfo</a> provides the same functionality (and more) in a much cleaner way.</p> <blockquote> <p>Windows users must include the bundled php_fileinfo.dll DLL file in php.ini to enable this extension.</p> <p>The libmagic library is bundled with PHP, but includes PHP specific changes. A patch against libmagic named libmagic.patch is maintained and may be found within the PHP fileinfo extensions source.</p> </blockquote> <p><a href="http://www.php.net/manual/en/fileinfo.installation.php">Read more</a></p>