ID:               23056
 Updated by:       [EMAIL PROTECTED]
 Reported By:      dan1 at edenpics dot com
 Status:           Bogus
 Bug Type:         Output Control
 Operating System: Linux RedHat 7.1
 PHP Version:      4.3.2RC1
 New Comment:

Disclaimer: the bird.gif _WAS_ jpeg before.. :)



Previous Comments:
------------------------------------------------------------------------

[2003-04-05 11:12:22] [EMAIL PROTECTED]

the example bird.gif is actually JPEG, not GIF..
And when having the correct script with correct imagetype,
this all works just fine.

This is NOT any bug in PHP.


------------------------------------------------------------------------

[2003-04-05 00:28:33] [EMAIL PROTECTED]

I copied your script directly and found a bird.gif image out there. 
You can see the result at:
http://lerdorf.com/bird.php
Source code at:
http://lerdorf.com/bird.phps
Works ok for me.  Perhaps you have something before or after the
start/end php tags, or do you have weird line endings or something?  Do
an "od -c bird.php" and compare it to:
http://lerdorf.com/bird.txt


------------------------------------------------------------------------

[2003-04-04 12:55:43] dan1 at edenpics dot com

Something more: this happens with all versions of Internet Explorer

------------------------------------------------------------------------

[2003-04-04 12:21:28] dan1 at edenpics dot com

Sorry, $output is the file name.
here is the correct code:

<?
header("Content-type: image/gif");
$output="bird.gif"; // file name
$fd = fopen($output,"r");
$filelength=filesize($output);
$contents = fread($fd,$filelength);
echo $contents; fclose($fd);
?>

I tried PHP version 4.3.2RC1. The same happens.
This bug appears with jpeg (.jpg) files too, with the "e99\r\n" code
before the picture datas, and they can only be saved as BMP too.

------------------------------------------------------------------------

[2003-04-04 11:05:48] [EMAIL PROTECTED]

fixed script, using PHP 4.3.2-RC, and it works fine.


------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/23056

-- 
Edit this bug report at http://bugs.php.net/?id=23056&edit=1

Reply via email to