Page 1 of 1

MIME Magic with XAMPP 1.7.7 - Fileinfo? [Answered]

PostPosted: 02. May 2012 20:28
by rlauriston
I'm trying to configure XAMPP for use with MindTouch Core as described here:

http://developer.mindtouch.com/en/kb/Installing_MindTouch_Core_on_Windows_(Apache)

One of the instructions for configuring PHP is to enable MIME Magic in php.ini:

extension=php_mime_magic.dll

I don't find that option in php.ini, nor do I find php_mime_magic.dll in the installation directory. I do find these lines in php.ini:

[mime_magic]
mime_magic.magicfile = "C:\xampp\php\extras\magic.mime"
;mime_magic.debug = On

However, C:\xampp\php\extras\magic.mime does not exist, even though C:\xampp\php\install.txt says it's bundled. The only module I find is for Apache (C:\xampp\apache\modules\mod_mime_magic.so).

Looking at the PHP documentation, I see a warning, "Mimetype extensions has been removed from PHP 5.3.0 in favor of Fileinfo."

http://php.net/manual/en/mime-magic.installation.php

Any suggestions?

Re: MIME Magic with XAMPP 1.7.7 - Fileinfo?

PostPosted: 07. May 2012 20:04
by JonB
If mime_magic appears on your phpinfo() - then its installed>?

Did you check that?

Re: MIME Magic with XAMPP 1.7.7 - Fileinfo?

PostPosted: 07. May 2012 20:27
by rlauriston
I don't find anything about mime_magic in phpinfo(). If it were installed it would show up in the Loaded Modules list? It's not there.

Re: MIME Magic with XAMPP 1.7.7 - Fileinfo?

PostPosted: 07. May 2012 21:27
by JonB
I did a bit of research -

I don't think you need that module, you should contact the authors of the script you are trying to install... I suspect that wiki is seriously out-of-date.

http://www.php.net/manual/en/fileinfo.installation.php

mime_magic is obsoleted in favor of the built-in fileinfo function. This is my reading of it.

Good Luck
8)

Re: MIME Magic with XAMPP 1.7.7 - Fileinfo?

PostPosted: 07. May 2012 21:40
by rlauriston
Yeah, that's how I read it as well.

I'm following the MindTouch's official installation instructions. The page was updated just last month. It was created in June 2010, after MIME Magic was replaced by Fileinfo.

Re: MIME Magic with XAMPP 1.7.7 - Fileinfo?

PostPosted: 08. May 2012 00:26
by JonB
It coulda been a 'cut & paste' from an older source. I'd see if there's a forum, an e-mail or mailing list for the script.

Good Luck and let us know what happens
8)