Bug #77299 [Fbk->NoF]: mime_content_type always returns default value
| From: | php-bugs at lists dot php dot net | Date: | Sun, 23 Dec 2018 04:22:04 +0000 |
| Subject: | Bug #77299 [Fbk->NoF]: mime_content_type always returns default value | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-218576@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=77299&edit=1
ID: 77299
Updated by: php-bugs@lists.php.net
Reported by: myshelter at gmail dot com
Summary: mime_content_type always returns default value
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: Filesystem function related
Operating System: Debian 9 (Stretch)
PHP Version: 7.3.0
Private report: N
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2018-12-15 20:46:19] ab@php.net
Thanks for the report. Please provide a file reproducing the issue. Please do not share any
copyrighted materials.
Thanks.
------------------------------------------------------------------------
[2018-12-14 17:30:09] myshelter at gmail dot com
Description:
------------
I decided to try PHP 7.3 today, and some things broke because both mime_content_type and finfo_file
(with FILEINFO_MIME) were returning application/octet-stream when they shouldn't.
In the same system, with no changes,
file -i /path/to/the/same/file
returned the correct MIME information for the file.
Downgrading to PHP 7.2.13 in the same system, with no other changes, same php.ini file parameters,
fixed the problem. /etc/magic.mime has been empty throughout the whole test.
Test script:
---------------
<?php
echo mime_content_type("/full/path/to/examplevideo.mkv");
Expected result:
----------------
video/x-matroska; charset=binary
Actual result:
--------------
application/octet-stream
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=77299&edit=1