Edit report at http://bugs.php.net/bug.php?id=53452&edit=1

 ID:                 53452
 Updated by:         il...@php.net
 Reported by:        gep at osiacat dot ru
 Summary:            fileinfo magic file path bug
-Status:             Open
+Status:             Bogus
 Type:               Bug
 Package:            *General Issues
 Operating System:   Cent OS
 PHP Version:        5.3.3
 Block user comment: N
 Private report:     N

 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

In PHP 5.3 the magic file is built-in into PHP and that is what should
be used. 

the magic file found on the system may not always be what libmagic
expects, hence 

the error.


Previous Comments:
------------------------------------------------------------------------
[2010-12-02 17:42:12] gep at osiacat dot ru

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 this bug report at http://bugs.php.net/bug.php?id=53452&edit=1

Reply via email to