note 86897 added to function.finfo-open
| From: | mark at dynom dot nl | Date: | Sun, 09 Nov 2008 20:34:08 +0000 |
| Subject: | note 86897 added to function.finfo-open | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-146322@lists.php.net to get a copy of this message | ||
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'); // added
".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."
----
Server IP: 213.249.64.162
Probable Submitter: 80.101.142.164
----
Manual Page -- http://www.php.net/manual/en/function.finfo-open.php
Edit -- https://master.php.net/note/edit/86897
Del: integrated -- https://master.php.net/note/delete/86897/integrated
Del: useless -- https://master.php.net/note/delete/86897/useless
Del: bad code -- https://master.php.net/note/delete/86897/bad+code
Del: spam -- https://master.php.net/note/delete/86897/spam
Del: non-english -- https://master.php.net/note/delete/86897/non-english
Del: in docs -- https://master.php.net/note/delete/86897/in+docs
Del: other reasons-- https://master.php.net/note/delete/86897
Reject -- https://master.php.net/note/reject/86897
Search -- https://master.php.net/manage/user-notes.php