#33131 [Opn->Bgs]: mime_content_type() returns text/plain always if mime_magic.debug is not set

From: Date: Wed, 25 May 2005 09:14:05 +0000
Subject: #33131 [Opn->Bgs]: mime_content_type() returns text/plain always if mime_magic.debug is not set
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-79467@lists.php.net to get a copy of this message
ID: 33131 Updated by: sniper@php.net Reported By: mikem at epi dot msu dot edu -Status: Open +Status: Bogus Bug Type: Unknown/Other Function Operating System: WinXP sp2 -PHP Version: 5CVS-2005-05-24 (dev) +PHP Version: 5.0.0 New Comment: You're obviously NOT using the latest CVS snapshot. (it works just fine for me..) Previous Comments: ------------------------------------------------------------------------ [2005-05-24 23:04:06] mikem at epi dot msu dot edu 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 this bug report at http://bugs.php.net/?id=33131&edit=1

« previous php.bugs (#79467) next »