PHP 8.1.0 Released!

Настройка во время выполнения

Данный модуль не определяет никакие директивы конфигурации в php.ini.

add a note add a note

User Contributed Notes 3 notes

thomandre at gmail dot com
8 years ago
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 :


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.
sam nospam at
11 years ago
In addition to
I also had to add
to my php configuration.  Then, I instantiate Finfo thus:

= 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.)
wade at waddles dot org
13 years ago
On Ubuntu Feisty, you need to add the line

to your /etc/php5/*/php.ini files. The extension gets linked at compile time to /usr/lib/ which uses a MAGIC environment variable which defaults to

To Top