#33131 [NEW]: mime_content_type() returns text/plain always if mime_magic.debug is not set
| From: | mikem at epi dot msu dot edu | Date: | Tue, 24 May 2005 21:04:07 +0000 |
| Subject: | #33131 [NEW]: mime_content_type() returns text/plain always if mime_magic.debug is not set | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-79455@lists.php.net to get a copy of this message | ||
From: mikem at epi dot msu dot edu
Operating system: WinXP sp2
PHP version: 5CVS-2005-05-24 (dev)
PHP Bug Type: *General Issues
Bug description: mime_content_type() returns text/plain always if mime_magic.debug is not set
Description:
------------
This a repost for bugs #26918 and #28936 which were both marked as "Bogus"
(which they are not.)
Here is the relevant part of my php.ini
mime_magic.magicfile = "C:\php5\extras\magic.mime"
mime_magic.debug = On
extension=php_mime_magic.dll
Here is the beginning of c:\windows\web\bullet.gif: GIF89a
From c:\php5\extra\magic.mime:
line 392: 0 string GIF8 image/gif
Reproduce code:
---------------
<?
print("File type is
".mime_content_type("c:\windows\web\bullet.gif")."\n");
?>
Expected result:
----------------
File type is image/gif
Actual result:
--------------
With "mime_magic.debug = Off" in php.ini:
C:\php5>php mime_test.php
File type is text/plain
With "mime_magic.debug = On" in php.ini:
C:\php5>php mime_test.php
File type is image/gif
--
Edit bug report at http://bugs.php.net/?id=33131&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33131&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33131&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33131&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=33131&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=33131&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=33131&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=33131&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=33131&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=33131&r=support
Expected behavior: http://bugs.php.net/fix.php?id=33131&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=33131&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=33131&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=33131&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33131&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=33131&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=33131&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=33131&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=33131&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=33131&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=33131&r=mysqlcfg