Edit report at https://bugs.php.net/bug.php?id=64684&edit=1
ID: 64684 Comment by: rg at mejoramos dot com Reported by: rg at mejoramos dot com Summary: FILEINFO_MIME_ENCODING fail Status: Feedback Type: Bug Package: *Directory/Filesystem functions Operating System: Windoqs and Linux PHP Version: 5.3.24 Assigned To: ab Block user comment: N Private report: N New Comment: Thanks by you interest. You can see ALL DETAIL by download: http://utp.guirv.com/descargas/?f=/PHP_BUG_64684.rar (318 bits) When you run in Windows: Warning: finfo_file(): Failed identify data 0:(null) in E:\HTTP... ...\PHP_BUG_64684\fileinfo.php on line 3 When you run in Linux CentOs: Warning: finfo_file() [function.finfo-file]: Failed identify data 0:(null) in /home/... .../PHP_BUG_64684/fileinfo.php on line 3 Previous Comments: ------------------------------------------------------------------------ [2013-04-21 16:28:56] a...@php.net I can't reproduce this using your snippet, I get us-ascii and that will be it in any case. For that I've created a file containing just 0. And, you might anyway be interested on the next 5.4 release as libmagic was upgraded, or already test the latest windows snapshot from http://windows.php.net/downloads/snaps/php-5.4/ . To reproduce this issue a reliable snippet in required. ------------------------------------------------------------------------ [2013-04-20 14:28:05] rg at mejoramos dot com Description: ------------ If FILE have contain exactly the string: "0" without quotes, then: in Windows output: Warning: finfo_file(): Failed identify data 0:(null) in ... in Linux output: Warning: finfo_file() [function.finfo-file]: Failed identify data 0:(null) in ... Why file have a "0" ? becouse I need read a integer in range 0-25 to take some decisions... Why I run finfo_file() ? Becouse I need know if last edition create UTF8 or ISO-8859-1 Test script: --------------- echo 'Encoding: '.finfo_file($finfo,$_FILES['name_in_FORM']['tmp_name'],FILEINFO_MIME_ENCODING); Remember: target file contain only the string: "0" without quotes. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=64684&edit=1