#49732 [Com]: PHP crashes when using finfo_file() to get mime info with this file (included)
| From: | nirvn dot asia at gmail dot com | Date: | Thu, 01 Oct 2009 07:51:01 +0000 |
| Subject: | #49732 [Com]: PHP crashes when using finfo_file() to get mime info with this file (included) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-143105@lists.php.net to get a copy of this message | ||
ID: 49732
Comment by: nirvn dot asia at gmail dot com
Reported By: nirvn dot asia at gmail dot com
Status: Open
Bug Type: Unknown/Other Function
Operating System: windows xp
PHP Version: 5.3.0
New Comment:
Hrm, I didn't know we can't attach files to bug reports. I've uploaded
it to our NGO website for easy access to any developer who would like to
help resolving this bug.
$fname = http://www.licadho-cambodia.org/php/kaboom.doc
I've also attached the basic debug info that XP outputs when it
crashes, you can access it from
http://www.licadho-cambodia.org/php/xpcrash.txt
Previous Comments:
------------------------------------------------------------------------
[2009-10-01 07:27:27] nirvn dot asia at gmail dot com
Description:
------------
Using the function finfo_file() to get the mime of the file attached to
this bug will crash PHP (and apache) on windows XP / 2003. I didn't have
the chance to test it on a linux machine.
Reproduce code:
---------------
//here's the code that goes kaboom
$finfo = finfo_open(FILEINFO_MIME);
$mime = finfo_file($finfo,realpath($fname));
finfo_close($finfo);
Expected result:
----------------
Returns the mime type of desired file.
Actual result:
--------------
Crash.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=49732&edit=1