[Mediawiki-l] Re: 1.5.0 mime_magic crash
FxParlant
f-x.p at laposte.net
Mon Oct 10 05:32:54 UTC 2005
Hi,
thanks for your answer. I really don't know why previous versions of MW
worked out of the box and not this one anymore. I'll try to find a copy
of php compiled with mime-magic. As a matter of fact, I've got a
mime-magic.dll in the extensions, but nothing like a MimeMagic.php file.
Thanks again
françois
Daniel Kinzler wrote:
> Hi all
>
> François wrote:
> ....
>
>> Fatal error: mime_magic could not be initialized, magic file (null) is
>> not avaliable in C:\apache2\htdocs\mediawiki15\includes\MimeMagic.php on
>> line 476
>
>
> This is a PHP issue - mime_content_type seems to be buggy under windows.
>
> Possible solutions:
>
> 1) See http://www.php.net/manual/en/function.mime-content-type.php,
> about half way down the page:
>
> The function mime_content_type only worked for me on Microsoft Windows
> after I added the directive "mime_magic.debug" to my php.ini with the
> value of "On". The default value appears to be "Off". Exampe:
>
> [mime_magic]
> mime_magic.debug = On
> mime_magic.magicfile = "c:\php\extras\magic.mime"
>
> 2) Install PHP with the fileinfo extension enabled (see
> http://pecl.php.net/package/fileinfo). MediaWiki will use it instead of
> mime_content_type, if it's available. Note that this probably also uses
> a mime.magic file somewhere, somehow...
>
> If (and only if!) you install fileinfo as a shared library, also set
> $wgLoadFileinfoExtension= true; in LocalSettings.php.
>
> 3) Use an external program for mime detection by setting
> $wgMimeDetectorCommand (in LocalSettings.php) to a command that will
> return the mime type of a file. Under linux, "file -bi" works fine, but
> that is not available under windows without a little fiddling. You might
> get it to work via cygwin.
>
>
> I hope this helps - please give feedback which solution works for you,
> so other people running 1.5 under windows have an idea how to solve this
> problem.
>
> Thanks for giving feedback!
> -- Duesentrieb
More information about the MediaWiki-l
mailing list