It seems there is quite some inconsistency in distributions and loading of magic files.
On Archlinux, the file is located here:
/usr/share/misc/file/magic.mgc
But this:
<?php
$fi = new finfo(FILEINFO_MIME, '/usr/share/misc/file/magic');
$fi->file('/tmp/fubar.txt');
?>
Actually segfaults, where if I type the full name (including the file extension:)
<?php
$fi = new finfo(FILEINFO_MIME, '/usr/share/misc/file/magic.mgc'); $fi->file('/tmp/fubar.txt');
?>
It works as expected, so I guess something goes wrong with "A .mime and/or .mgc suffix is added if needed."