Bug #77299 [NEW]: mime_content_type always returns default value

From: Date: Fri, 14 Dec 2018 17:30:09 +0000
Subject: Bug #77299 [NEW]: mime_content_type always returns default value
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-218454@lists.php.net to get a copy of this message
From: myshelter at gmail dot com Operating system: Debian 9 (Stretch) PHP version: 7.3.0 Package: Filesystem function related Bug Type: Bug Bug description:mime_content_type always returns default value 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 bug report at https://bugs.php.net/bug.php?id=77299&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77299&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77299&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77299&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=77299&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=77299&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=77299&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=77299&r=needscript Try newer version: https://bugs.php.net/fix.php?id=77299&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=77299&r=support Expected behavior: https://bugs.php.net/fix.php?id=77299&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=77299&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=77299&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=77299&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77299&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=77299&r=dst IIS Stability: https://bugs.php.net/fix.php?id=77299&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=77299&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=77299&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=77299&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=77299&r=mysqlcfg

« previous php.bugs (#218454) next »