ID: 23056 Updated by: [EMAIL PROTECTED] Reported By: dan1 at edenpics dot com -Status: Open +Status: Analyzed Bug Type: Output Control Operating System: Linux RedHat 7.1 PHP Version: 4.3.2RC1 New Comment:
I don't see how this could possible be a PHP problem. I see nothing wrong with the output of your script. I sent an IE6 request and looked at the output. The headers sent by http://www.edenpics.com/pub/iebug/bird.php were: HTTP/1.1 200 OK Date: Sat, 05 Apr 2003 23:13:47 GMT Server: Apache X-Powered-By: PHP/4.1.2 Cache-Control: no-cache, must-revalidate Connection: close Content-Type: image/gif Followed by this gif datastream: 0000000 G I F 8 9 a 2 \0 ( \0 367 204 \0 001 002 002 0000020 003 002 \t 005 \n 017 \b 003 \b \f \n 002 \n \n \v 003 0000040 006 025 006 \t 035 \n \f 032 \f 021 036 024 024 026 020 024 0000060 036 \v 021 ! 016 023 ( 024 025 - 027 033 ) 022 031 2 0000100 033 036 0 032 $ . 025 # 8 033 ! < 030 ( : ! 0000120 + E # , N * 3 L ' 1 Q ' 1 \ 1 < 0000140 V / < b , > l + < r 7 E n : E g 0000160 < M m ; J s = L ~ ? P | A N x B I see nothing wrong. Previous Comments: ------------------------------------------------------------------------ [2003-04-05 15:59:06] dan1 at edenpics dot com Yes, the bird was in JPEG before, I changed it in GIF, to be more coherent with the code. It's because I tested several formats, sorry for this incovenience. However, the bug appears in GIF or JPEG, so the bug is the same now. I just found out that the bug comes out only if we sent the "Cache-Control" header along with the picture, which is something I forgot to mention in my previous code, because I thought that it was not relevant. In fact, THIS IS the problem. So here is the code that really generates the bug: <? header("Content-type: image/gif"); header("Cache-Control: no-cache, must-revalidate"); $output="bird.gif"; // file name $fd = fopen($output,"r"); $filelength=filesize($output); $contents = fread($fd,$filelength); echo $contents; fclose($fd); ?> If you comment out the Cache-Control header line, everything works fine, so this is a workaround. However, I think that it is still a PHP bug, don't you ? Please try again (1 minute), I updated the report page: http://www.edenpics.com/pub/iebug/iebug2.phtml Thank you. ------------------------------------------------------------------------ [2003-04-05 11:13:29] [EMAIL PROTECTED] Disclaimer: the bird.gif _WAS_ jpeg before.. :) ------------------------------------------------------------------------ [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 ------------------------------------------------------------------------ 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
