PHP 4.0 Bug #9509: garbled image file
| From: | rupert at ditzed dot org | Date: | Thu, 01 Mar 2001 16:19:51 +0000 |
| Subject: | PHP 4.0 Bug #9509: garbled image file | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-47720@lists.php.net to get a copy of this message | ||
From: rupert@ditzed.org
Operating system: Windows98
PHP version: 4.0.4pl1
PHP Bug Type: Filesystem function related
Bug description: garbled image file
I was previously using fopen() and fpassthru to grab a gif image and pass it to the browser. This
worked fine.
Then I installed PHP4.0.4pl1 and the image that now gets returned is garbled (the image appears to
be the right dimensions, but filesize shows 150 bytes, not 406 bytes which is what the image
actually is).
On any html page the following line was installed:
<IMG src="track.php?ref=12345">
track.php then looks like this:
<?
$image = fopen ("track.gif", "r");
fpassthru ($image);
?>
I tried the same with the readfile() function, as follows:
<?
readfile("track.gif");
?>
same result.
Other file I/O appears to be fine.
--
Edit Bug report at: http://bugs.php.net/?id=9509&edit=1