
私がやっていることはこれです:
$ php
<?php
$finfo=finfo_open(FILEINFO_MIME, '/usr/share/file/magic');
私が得たものは次のとおりです:
PHP Notice: finfo_open(): Warning: description `8-bit ISDN mu-law compressed (CCITT G.721 ADPCM voice data enco' truncated in - on line 2
PHP Notice: finfo_open(): Warning: description `8-bit ISDN mu-law compressed (CCITT G.721 ADPCM voice data enco' truncated in - on line 2
PHP Notice: finfo_open(): Warning: <= not supported in - on line 2
PHP Notice: finfo_open(): Warning: <= not supported in - on line 2
PHP Notice: finfo_open(): Warning: <= not supported in - on line 2
PHP Notice: finfo_open(): Warning: >= not supported in - on line 2
PHP Warning: finfo_open(): Failed to load magic database at '/usr/share/file/magic'. in - on line 2
これは、クリーンな CentOS 5.5、PHP 5.3 のインストールです。ファイルが/usr/share/file/magic
存在し、アクセス可能です。