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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Fri May 17 21:01:33 2024 UTC