Bug #7391 [NEW]: FileInfo Error

From: Date: Thu, 13 Apr 2006 15:53:40 +0000
Subject: Bug #7391 [NEW]: FileInfo Error
Groups: php.pear.webmaster 
Request: Send a blank email to pear-webmaster+get-4972@lists.php.net to get a copy of this message
From: nimshon at gmail dot com Operating system: FreeBSD 6.0 i386 PHP version: 5.1.0 Package: Bug System Bug Type: Bug Bug description: FileInfo Error Description: ------------ Error in the Fileinfo Package, can't use it... (I have php 5.1.2 but it doesn't appear in the versions list) Reproduce code: --------------- <?php $finfo = finfo_open(FILEINFO_MIME); // return mime type ala mimetype extension foreach (glob("*") as $filename) { echo finfo_file($finfo, $filename) . "\n"; } finfo_close($finfo); ?> (Taken from the manual http://www.php.net/manual/en/function.finfo-file.php ) Expected result: ---------------- i expected the page to display the mimetypes of the files in the script's dir Actual result: -------------- Warning: finfo_open() [function.finfo-open]: Failed to load magic database at ''. in /usr/home/http/html/fileinfo.php on line 10 Warning: finfo_file(): supplied argument is not a valid file_info resource in /usr/home/http/html/fileinfo.php on line 13 (...) -- Edit bug report at http://pecl.php.net/bugs/bug.php?id=7391&edit=1 --

« previous php.pear.webmaster (#4972) next »