#33028 [NEW]: mime_content_type returns inaccurate Office content types

From: Date: Fri, 13 May 2005 18:12:36 +0000
Subject: #33028 [NEW]: mime_content_type returns inaccurate Office content types
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-78983@lists.php.net to get a copy of this message
From: matt at kanchi dot org Operating system: OS X PHP version: 4.3.10 PHP Bug Type: Filesystem function related Bug description: mime_content_type returns inaccurate Office content types Description: ------------ Certain Office files do not return an accurate MIME content type with mime_content_type. Excel and Powerpoint, for example, return an application/msword type, while Access returns text/plain. Images, text, and Word files return correctly. These files were generated in Office 2002 for Windows. Configuration options: --with-mime-magic From php.ini: mime_magic mime_magic support => enabled Directive => Local Value => Master Value mime_magic.magicfile => /usr/share/file/magic.mime => /usr/share/file/magic.mime Reproduce code: --------------- mime_content_type("/some/path/to/xls-file"); mime_content_type("/some/path/to/ppt-file"); mime_content_type("/some/path/to/mdb-file"); Expected result: ---------------- application/msexcel application/mspowerpoint application/msaccess Or some variation (vnd, x-, etc.). Actual result: -------------- application/msword application/msword text/plain -- Edit bug report at http://bugs.php.net/?id=33028&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33028&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33028&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33028&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=33028&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=33028&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33028&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33028&r=needscript Try newer version: http://bugs.php.net/fix.php?id=33028&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33028&r=support Expected behavior: http://bugs.php.net/fix.php?id=33028&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33028&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33028&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=33028&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33028&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=33028&r=dst IIS Stability: http://bugs.php.net/fix.php?id=33028&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33028&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33028&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33028&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33028&r=mysqlcfg

« previous php.bugs (#78983) next »