php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33131 mime_content_type() returns text/plain always if mime_magic.debug is not set
Submitted: 2005-05-24 23:04 UTC Modified: 2005-05-25 11:14 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: mikem at epi dot msu dot edu Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 5.0.0 OS: WinXP sp2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mikem at epi dot msu dot edu
New email:
PHP Version: OS:

 

 [2005-05-24 23:04 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-05-25 11:14 UTC] sniper@php.net
You're obviously NOT using the latest CVS snapshot. (it works just fine for me..)

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 05 02:01:35 2025 UTC