#49732 [Opn->Fbk]: PHP crashes when using finfo_file() to get mime info with this file (included)
| From: | pajoye@php.net | Date: | Thu, 01 Oct 2009 09:21:28 +0000 |
| Subject: | #49732 [Opn->Fbk]: 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-143108@lists.php.net to get a copy of this message | ||
ID: 49732
Updated by: pajoye@php.net
Reported By: nirvn dot asia at gmail dot com
-Status: Open
+Status: Feedback
Bug Type: Unknown/Other Function
Operating System: windows xp
PHP Version: 5.3.0
-Assigned To:
+Assigned To: pajoye
New Comment:
Can you post a link to the file or drop me a mail with the file
attached please?
Please also try using a 5.3 snapshot
(http://windows.php.net/snapshots).
Previous Comments:
------------------------------------------------------------------------
[2009-10-01 07:51:01] nirvn dot asia at gmail dot com
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
------------------------------------------------------------------------
[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