php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #64799 Discussion of magic file selection is incorrect.
Submitted: 2013-05-09 13:11 UTC Modified: 2013-05-16 19:20 UTC
From: weierophinney@php.net Assigned: aharvey (profile)
Status: Duplicate Package: Documentation problem
PHP Version: 5.4.15 OS: N/A
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: weierophinney@php.net
New email:
PHP Version: OS:

 

 [2013-05-09 13:11 UTC] weierophinney@php.net
Description:
------------
---
From manual page: http://www.php.net/function.finfo-open#refsect1-
function.finfo-open-parameters
---

Please see https://bugs.php.net/bug.php?id=64793 for more details. Essentially, 
the following statements are incorrect:

"Name of a magic database file, usually something like /path/to/magic.mime. 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.

Passing NULL or an empty string will be equivalent to the default value."

If null or an empty string is passed, PHP uses its bundled magic.mime database. 
Additionally, this is _recommended_, as PHP may or may not be able to properly 
parse other magic.mime databases.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-05-09 13:12 UTC] weierophinney@php.net
Additionally, a note should likely be added stating something along the lines of 
"If finfo_open is raising warnings or errors, you may want to unset your $MAGIC 
environment variable to force usage of PHP's bundled magic.mime database."
 [2013-05-16 19:20 UTC] aharvey@php.net
-Status: Open +Status: Duplicate -Assigned To: +Assigned To: aharvey
 [2013-05-16 19:20 UTC] aharvey@php.net
Sorry, hadn't gotten this far in my bugmail when I reopened the other bug. Closing in favour of bug #64793.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 14:01:29 2024 UTC