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
 [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

Pull Requests

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: Sun Dec 22 06:01:30 2024 UTC