From:             majkl578 at gmail dot com
Operating system: Linux Debian
PHP version:      5.3.0
PHP Bug Type:     Filesystem function related
Bug description:  finfo returns mime type + charset when FILEINFO_MIME is used

Description:
------------
When finfo is used with FILEINFO_MIME flag for a file, it returns mime
type + charset (in this format: mime/type; charset=foo


Configure Command:
'./configure' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-mysql'
'--with-mysqli' '--with-curl' '--with-sqlite' '--with-gd'
'--enable-mbstring' '--with-openssl' '--disable-short-tags' '--with-mcrypt'
'--with-bz2' '--with-zlib' '--enable-zip' 

Reproduce code:
---------------
$obj = new \finfo(FILEINFO_MIME);
echo $obj->file('/tmp/phpbug'); //in file is plain text

Expected result:
----------------
text/plain

Actual result:
--------------
text/plain; charset=us-ascii

-- 
Edit bug report at http://bugs.php.net/?id=48885&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        
http://bugs.php.net/fix.php?id=48885&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        
http://bugs.php.net/fix.php?id=48885&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        
http://bugs.php.net/fix.php?id=48885&r=trysnapshot60
Fixed in CVS:                        
http://bugs.php.net/fix.php?id=48885&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=48885&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=48885&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=48885&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=48885&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=48885&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=48885&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=48885&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=48885&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=48885&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=48885&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=48885&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=48885&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=48885&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=48885&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=48885&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=48885&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=48885&r=mysqlcfg

Reply via email to