php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56472 Detection doesn't work on small files
Submitted: 2005-08-02 19:26 UTC Modified: 2005-10-23 05:57 UTC
From: mjs15451 at hotmail dot com Assigned:
Status: Not a bug Package: Fileinfo (PECL)
PHP Version: 5.0.3 OS: Gentoo
Private report: No CVE-ID: None
 [2005-08-02 19:26 UTC] mjs15451 at hotmail dot com
Description:
------------
On a 1 byte text file, fileinfo returns this as a mimetype:
very short file (no magic)

Reproduce code:
---------------
$file = '/path/to/file/1bytefile.txt';
$info = new finfo(FILEINFO_MIME);
echo $info->file($file);

Expected result:
----------------
Should output text/plain; charset=charsetOfFile

Actual result:
--------------
Outputs: very short file (no magic)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-23 05:57 UTC] mike@php.net
Sorry, but your problem does not imply a bug in PECL itself.  For a
list of more appropriate places to ask for help using PECL, please
visit http://pecl.php.net/support/ as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PECL.

Actually a libmagic issue.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 10:01:29 2024 UTC