note 73924 modified in ref.fileinfo by aidan
| From: | aidan@php.net | Date: | Sat, 21 Apr 2007 07:18:29 +0000 |
| Subject: | note 73924 modified in ref.fileinfo by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-125732@lists.php.net to get a copy of this message | ||
PHP Warning: finfo::finfo(): Failed to load magic database at '/etc/magic'
PHP Warning: finfo::file(): The invalid fileinfo object
These errors can be rectified by copying your magic database (depending on your distro, this file
can be anywhere, on debian it's in /usr/share/file/magic) to /etc/magic.mime
libmagic automatically appends the .mime to the end of the filename, so PHP incorrectly reports the
path it was looking for.
The same applies for:
PHP Warning: finfo::finfo(): Failed to load magic database at '/etc/magic.mime'
Unfortunately users will have to call the magic file /etc/magic.mime.mime in this case.
--was--
PHP Warning: finfo::finfo(): Failed to load magic database at '/etc/magic'
PHP Warning: finfo::file(): The invalid fileinfo object
These errors can be rectified by copying your magic database (depending on your distro, this file
can be anywhere, on debian it's in /usr/share/file/magic) to /etc/magic.mime
libmagic automatically appends the .mime to the end of the filename, so PHP incorrectly reports the
path it was looking for.
http://php.net/manual/en/ref.fileinfo.php