php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35541 mime_content_type() always returns blank value
Submitted: 2005-12-04 06:52 UTC Modified: 2005-12-12 01:00 UTC
Votes:2
Avg. Score:3.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: whitehatcheck at yahoo dot com Assigned:
Status: No Feedback Package: *General Issues
PHP Version: 4.4.1 OS: Gentoo 2.6 kernel
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: whitehatcheck at yahoo dot com
New email:
PHP Version: OS:

 

 [2005-12-04 06:52 UTC] whitehatcheck at yahoo dot com
Description:
------------
mod_php-4.4.0-r9
apache-2.0.54-r31 

I'm unable to upgrade to 4.4.1. Gentoo has not marked it stable yet.

mime_content_type() always returns a blank value.

echo mime_content_type('xface.jpg');

I've verified that php is compiled with mime support:

--with-mime-magic=/usr/share/misc/file/magic.mime'
mime_magic.magicfile /usr/share/misc/file/magic.mime /usr/share/misc/file/magic.mime 

That file exists.
ls -al /usr/share/misc/file/magic.mime
-rw-r--r--  1 root root 31282 Oct  9 10:42 /usr/share/misc/file/magic.mime



Reproduce code:
---------------
echo mime_content_type('xface.jpg');

Expected result:
----------------
Would expect content type returned.

Actual result:
--------------
blank 'no value' was returned

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-04 07:50 UTC] sniper@php.net
Try using some other mime.magic file. This works just fine for me in PHP 5.1.2-dev. 

This is what I have in my php.ini:
mime_magic.magicfile="/etc/httpd/conf/magic"
 [2005-12-12 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 11:01:30 2024 UTC