Description of problem: Warning: finfo_open(): Failed to load magic database at '/usr/share/misc/ magic'. in /home/robert/test.php on line 2 Warning: finfo_file(): supplied argument is not a valid file_info resource in / home/robert/test.php on line 3 Warning: finfo_close(): supplied argument is not a valid file_info resource in / home/robert/test.php on line 4 The file test.php contains: <?php $finfo = finfo_open(FILEINFO_MIME); echo finfo_file($finfo, "/bin/cp"); finfo_close($finfo); ?> Version-Release number of selected component (if applicable): php-pecl-Fileinfo-1.0.4-1 How reproducible: Everytime, see above. Actual results: Not working php-pecl-Fileinfo package. Expected results: Working php-pecl-Fileinfo package. Additional info: A hackish workaround is "$finfo = finfo_open(FILEINFO_MIME, "/usr/share/file/ magic");" instead of "$finfo = finfo_open(FILEINFO_MIME);".
I'm also seeing this - the wierd thing is that /usr/share/misc/magic does exist. The only difference between it and /usr/share/file/magic is that it is a symbolic link to the real one. This appears to be a feature of libmagic - a test program that calls magic_load() on /usr/share/misc/magic fails with "No such file or directory" as the error. So either libmagic (part of file) needs to be fixed, or the php-pecl-Filesize configure script needs to ignore symbolic links when looking for a magic file to use.
Fixed in php-pecl-Fileinfo-1.0.4-2.fc[567]