|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54714 finfo_open doesn't load .mgc when default magic_file is a directory
Submitted: 2011-05-12 00:23 UTC Modified: 2021-03-03 12:47 UTC
From: hugh at catalyst dot net dot nz Assigned: cmb (profile)
Status: Closed Package: Unknown/Other Function
PHP Version: 5.3.6 OS: Ubuntu 11.04
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: hugh at catalyst dot net dot nz
New email:
PHP Version: OS:


 [2011-05-12 00:23 UTC] hugh at catalyst dot net dot nz
The finfo_open function has the 2nd argument magic_file. It's default is meant to 
be the following:

If not specified, the MAGIC environment variable is used. If this variable is not 
set either, /usr/share/misc/magic is used by default. A .mime and/or .mgc suffix 
is added if needed.

On my system, the /usr/share/misc/magic is a directory (with no files beneath 

I think in the case that the default magic_file is a directory, load the next 
default (/usr/share/misc/magic.mgc)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-08-26 13:55 UTC]
-Package: Filesystem function related +Package: Unknown/Other Function
 [2020-11-09 17:01 UTC]
That documentation has been fixed long ago (see bug #64793), so
this ticket is obsolete.
 [2021-03-03 12:47 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2021-03-03 12:47 UTC]
… so can be closed.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jun 18 22:01:29 2024 UTC