Runtime Configuration

This extension has no configuration directives defined in php.ini.

Коментарии

In addition to
 extension=fileinfo.so
I also had to add
 mime_magic.magicfile=/usr/share/file/magic
to my php configuration.  Then, I instantiate Finfo thus:

<?php
$mimeMagicFile 
get_cfg_var('mime_magic.magicfile');
$finfo = new finfo(FILEINFO_MIME$mimeMagicFile);
?>

(This is despite the rumours I hear about the default being exactly what I set it to anyway.)
2010-03-24 00:03:10
http://php5.kiev.ua/manual/ru/fileinfo.configuration.html
In the PHP 5.3.13 CLI version, it might use the "MAGIC" environnement variable to get the magic database file. Due to the fact that this version doesn't use the standard format, this file may be wrong. You can see it via a simple script : 

<?php
    var_dump
($_SERVER['MAGIC']);
?>

Unset this variable and it will work again. You can use unsetenv (C-Shell) or unset (Bourne Shell).

This does not affect the Apache version. Other CLI versions might be affected.

I lost a lot of time on this undocumented issue.
2013-05-30 17:41:16
http://php5.kiev.ua/manual/ru/fileinfo.configuration.html

    Поддержать сайт на родительском проекте КГБ