Bug #54016 [NEW]: finfo_file: Cannot determine filetype in archives
| From: | bjori@php.net | Date: | Mon, 14 Feb 2011 15:20:56 +0000 |
| Subject: | Bug #54016 [NEW]: finfo_file: Cannot determine filetype in archives | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-158768@lists.php.net to get a copy of this message | ||
From: bjori
Operating system: Linux
PHP version: 5.3.5
Package: Filesystem function related
Bug Type: Bug
Bug description:finfo_file: Cannot determine filetype in archives
Description:
------------
finfo_file() does not support stream wrappers, such as zip://, even though
it has
stream context option :(
Test script:
---------------
<?php
$fp = finfo_open(FILEINFO_MIME_TYPE);
$png = "zip://" . __DIR__ . "/resources/dir.zip#dir/test.png"
var_dump(finfo_file($fp, $png));
Expected result:
----------------
string(9) "image/png"
Actual result:
--------------
PHP Warning: finfo_file(): File or path not found
'zip:///home/bjori/Work/OSS/svn-php/php/php-
src/branches/PHP_5_3/ext/fileinfo/tests/resources/dir.zip#dir/test.png' in
/home/bjori/Work/OSS/svn-php/php/php-src/branches/PHP_5_3/t.php on line 5
--
Edit bug report at http://bugs.php.net/bug.php?id=54016&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=54016&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=54016&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=54016&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=54016&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=54016&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=54016&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=54016&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=54016&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=54016&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=54016&r=support
Expected behavior: http://bugs.php.net/fix.php?id=54016&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=54016&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=54016&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=54016&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54016&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=54016&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=54016&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=54016&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=54016&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=54016&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=54016&r=mysqlcfg