From: Operating system: Cent OS PHP version: 5.3.3 Package: *General Issues Bug Type: Bug Bug description:fileinfo magic file path bug
Description: ------------ This bug was reproduced only in PHP 5.3.3 On PHP 5.2.6 works fine. If you pass a path to magic file situated in Cent OS in "/usr/share/file/magic" to finfo_open, then PHP cannot parse magic file. Though finfo_open(FILEINFO_MIME_TYPE) without second parameter as magic file path works fine. (magic file path is taken from system environment) Test script: --------------- $finfo = finfo_open(FILEINFO_MIME_TYPE, '/usr/share/file/magic'); echo finfo_file($finfo, 'www/images/message-container/info_icon.png'); Expected result: ---------------- image/png Actual result: -------------- PHP Notice: finfo_open(): Warning: description `8-bit ISDN mu-law compressed (CCITT G.721 ADPCM voice data enco' truncated in /home/blackjack/www/test.php on line 1 PHP Notice: finfo_open(): Warning: description `8-bit ISDN mu-law compressed (CCITT G.721 ADPCM voice data enco' truncated in /home/blackjack/www/test.php on line 1 PHP Notice: finfo_open(): Warning: <= not supported in /home/blackjack/www/test.php on line 1 PHP Notice: finfo_open(): Warning: <= not supported in /home/blackjack/www/test.php on line 1 PHP Notice: finfo_open(): Warning: <= not supported in /home/blackjack/www/test.php on line 1 PHP Notice: finfo_open(): Warning: >= not supported in /home/blackjack/www/test.php on line 1 PHP Warning: finfo_open(): Failed to load magic database at '/usr/share/file/magic'. in /home/blackjack/www/test.php on line 1 PHP Warning: finfo_file() expects parameter 1 to be resource, boolean given in /home/blackjack/www/test.php on line 1 -- Edit bug report at http://bugs.php.net/bug.php?id=53452&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=53452&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=53452&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=53452&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=53452&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=53452&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=53452&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=53452&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=53452&r=needscript Try newer version: http://bugs.php.net/fix.php?id=53452&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=53452&r=support Expected behavior: http://bugs.php.net/fix.php?id=53452&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=53452&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=53452&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=53452&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=53452&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=53452&r=dst IIS Stability: http://bugs.php.net/fix.php?id=53452&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=53452&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=53452&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=53452&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=53452&r=mysqlcfg
