Bug #77299 [Opn->Fbk]: mime_content_type always returns default value

From: Date: Sat, 15 Dec 2018 20:46:19 +0000
Subject: Bug #77299 [Opn->Fbk]: mime_content_type always returns default value
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-218464@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: ab@php.net Reported by: myshelter at gmail dot com Summary: mime_content_type always returns default value -Status: Open +Status: Feedback Type: Bug Package: Filesystem function related Operating System: Debian 9 (Stretch) PHP Version: 7.3.0 Block user comment: N Private report: N New Comment: Thanks for the report. Please provide a file reproducing the issue. Please do not share any copyrighted materials. Thanks. Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#218464) next »