#33012 [Opn->Fbk]: fread/fopen error
| From: | tony2001@php.net | Date: | Thu, 12 May 2005 06:01:43 +0000 |
| Subject: | #33012 [Opn->Fbk]: fread/fopen error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-78921@lists.php.net to get a copy of this message | ||
ID: 33012
Updated by: tony2001@php.net
Reported By: justin at aofrozencity dot com
-Status: Open
+Status: Feedback
Bug Type: Filesystem function related
Operating System: Windows 2003 Server
PHP Version: 4.3.11
New Comment:
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PHP.
Previous Comments:
------------------------------------------------------------------------
[2005-05-12 05:59:59] justin at aofrozencity dot com
Description:
------------
I figured out why the problem is. I found out that fread/fopen doesn't
read image file exactly and properly because I checked orginal image
file code that isn't match the image file code which was from
fread/fopen.
Reproduce code:
---------------
// Output PNG Image
$file = fopen('images/tmp/'.$tmpname, 'rb');
$source = fread($file , filesize('images/tmp/'.$tmpname));
fclose($file);
header("Content-Type: image/png");
print($source);
Expected result:
----------------
"The image cannot be displayed, because it contains errors"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33012&edit=1