Bug #76543 [NEW]: mime_content_type returns false mimetype for svg files

From: Date: Thu, 28 Jun 2018 22:58:58 +0000
Subject: Bug #76543 [NEW]: mime_content_type returns false mimetype for svg files
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-216026@lists.php.net to get a copy of this message
From: michael dot wolfram at smart-webwork dot de Operating system: Ubuntu 18.04 LTS PHP version: Irrelevant Package: *Directory/Filesystem functions Bug Type: Bug Bug description:mime_content_type returns false mimetype for svg files Description: ------------ function mime_content_type return false MIME-Type for a svg file. It returns image/svg instead of image/svg+xml. The function mimetype on ubuntu bash on same host returns the correct mimetype. PHP configuration: PHP 7.2.5-0ubuntu0.18.04.1 (cli) (built: May 9 2018 17:21:02) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.2.5-0ubuntu0.18.04.1, Copyright (c) 1999-2018, by Zend Technologies Test script: --------------- on ubuntu bash $ wget https://framework.zend.com/img/zend-framework-logo.svg // correct mimetype with bash function mimetype $ mimetype -M zend-framework-logo.svg // incorrect mimetype with php $ php -r 'echo mime_content_type("zend-framework-logo.svg");' Expected result: ---------------- image/svg+xml Actual result: -------------- image/svg -- Edit bug report at https://bugs.php.net/bug.php?id=76543&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76543&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76543&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76543&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=76543&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=76543&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=76543&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=76543&r=needscript Try newer version: https://bugs.php.net/fix.php?id=76543&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=76543&r=support Expected behavior: https://bugs.php.net/fix.php?id=76543&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=76543&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=76543&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=76543&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76543&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=76543&r=dst IIS Stability: https://bugs.php.net/fix.php?id=76543&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=76543&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=76543&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=76543&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=76543&r=mysqlcfg

« previous php.bugs (#216026) next »