ID: 28863
User updated by: jsgoupil at lookstrike dot com
Reported By: jsgoupil at lookstrike dot com
Status: Open
Bug Type: GD related
Operating System: WinXP
PHP Version: 5.0.0RC3
New Comment:
the reproduce code... supposed to be the same test file... so Open
"test1.php"... and include("test1.php");
:)
Previous Comments:
------------------------------------------------------------------------
[2004-06-21 08:53:01] jsgoupil at lookstrike dot com
Description:
------------
You will say that i'm really weird to do that, but i don't know how
that happen :
I check into one file, i found the following chars :
chr(239) + chr(187) + chr(191)
Keep the order ! it's important !
(I found that in one of my file, but dont ask me why !)
If you try to include this kind of file before doing a PNG image, you
will get a WRONG png format. (Starting with "?PNG"...)
The chars above can't be read under Notepad, neither under IE (perhaps
because i'm under WinXP). It can't be deleted from NotePad (if you
clear the file completly, the file will still have 3bytes undeletable)
but you can delete it with wordpad...
I search really a lot of time to found that problem... because I was
including a file that had that kind of chars...
Reproduce code:
---------------
VBScript to put chr into file
Open "test1.php" For Output As #1
Print #1, Chr(239) + Chr(187) + Chr(191)
Close #1
PHP Script :
<?php
include("test3.php");
$im = imagecreate(1024, 1024)
or die("Can't Initialize the GD Libraty");
imagecolorallocate($im,255,255,255);
imagepng($im);
?>
Expected result:
----------------
Supposed return some chars in IE and after the PNG format like : "�PNG
".....
Because normally, if you do a
echo "a";
imagepng($im);
You will receive the "a" and after the PNG format in text.
Actual result:
--------------
Under WinXP I receive directly the wrong PNG format... like : "?PNG
IHDREӹ?PLTE?ěȀ?IDATx?큁?
[EMAIL PROTECTED]?!ҦIEND?B`?"
(Without ")
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28863&edit=1