PHP 4.0 Bug #9509 Updated: garbled image file
| From: | sniper@php.net | Date: | Tue, 10 Apr 2001 14:14:33 +0000 |
| Subject: | PHP 4.0 Bug #9509 Updated: garbled image file | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-51332@lists.php.net to get a copy of this message | ||
ID: 9509
Updated by: sniper
Reported By: rupert@ditzed.org
Old-Status: Feedback
Status: Closed
Bug Type: Filesystem function related
Assigned To:
Comments:
No feedback and most likely the missing 'b' issue.
--Jani
Previous Comments:
---------------------------------------------------------------------------
[2001-03-01 22:10:22] sniper@php.net
Try adding 'b' into fopen:
$image=fopen("track.gif", "rb");
Check the manual page for fopen:
http://www.php.net/fopen
--Jani
---------------------------------------------------------------------------
[2001-03-01 11:19:51] rupert@ditzed.org
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.
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9509&edit=2