From:             jalonso at art3mis dot com
Operating system: debian / linux
PHP version:      5.0.0b3 (beta3)
PHP Bug Type:     Unknown/Other Function
Bug description:  mime_content_type() returns text/plain always if mime_magic.debug is 
not set

Description:
------------
mime_content_type() will return text/plain for all files except if you set
mime_magic.debug to On on php.ini. It won't work if you try to change it
with ini_alter('mime_magic.debug').

Reproduce code:
---------------
php.ini has 
mime_magic.magicfile = "/usr/share/misc/file/magic.mime"
;mime_magic.debug     = On


<?php
echo mime_content_type('/bin/ping');
?>

Expected result:
----------------
application/x-executable

Actual result:
--------------
text/plain

-- 
Edit bug report at http://bugs.php.net/?id=26918&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26918&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26918&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=26918&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=26918&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=26918&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=26918&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=26918&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=26918&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=26918&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=26918&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=26918&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=26918&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26918&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=26918&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=26918&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=26918&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26918&r=float

Reply via email to