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
Have you experienced this issue?
Rate the importance of this bug to you:

 [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

Add a Patch

Pull Requests

Add a Pull Request

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: Wed Apr 24 07:01:29 2024 UTC