plFileHandler: ...undefined function mime_content_type

Postdate: April 17 2012
Category: plFileHandler
Applies to: all

Problem uploading mp3 or flv receiving an error message: Fatal error: Call to undefined function mime_content_type

I once got an error message uploading mp3 and flv files:
Fatal error: Call to undefined function mime_content_type()...
and found out that a certain server module is needed but none of my hosts got it.

According to the PHP manual:
"The function requires the (deprecated) Mime Magic extension to be activated." 

I edited /modules/plFileHandler/function.GetFileInfo.php on line 53:

$info["mime"] = mime_content_type($filepath);
$info["mime"] = pathinfo($filepath);

And it worked.