Hi,
this morning, i have detect a bug with my binary tables. phpMyAdmin convert (destroy) all data from charcode 128 to 160 if you edit and save a row within.
for example the charcode for the euro-symbol chr(128) is converted to html entity €
---<MYSQL TABLE>--- CREATE TABLE Binary_Table ( ID mediumint(8) unsigned NOT NULL auto_increment, MyData blob NOT NULL, PRIMARY KEY (ID) ) TYPE=MyISAM; ---</MYSQL>--- ---<PHPCODE TO INSERT BINARY DATA>---- <?php //for ($i=0,$binary="";$i<255;$i++,$binary.=chr($i)){} for ($i=128,$binary="";$i<160;$i++,$binary.=chr($i)){} $query="insert into Binary_Table (MyData) values ('".mysql_escape_string($binary)."')"; mysql_query($query); ?> ---</PHP>---
I think it is a major bug, because RC3 haven't this problem.
Regards,
-- Steve
Ok, now I can reproduce this bug. It happens in IE 5, not NN4, and you must use the exact script Steve gives us to populate the table (with the empty block in the for loop), which creates one row.
Steve Alberty a écrit :
Hi,
this morning, i have detect a bug with my binary tables. phpMyAdmin convert (destroy) all data from charcode 128 to 160 if you edit and save a row within.
for example the charcode for the euro-symbol chr(128) is converted to html entity €
---<MYSQL TABLE>--- CREATE TABLE Binary_Table ( ID mediumint(8) unsigned NOT NULL auto_increment, MyData blob NOT NULL, PRIMARY KEY (ID) ) TYPE=MyISAM; ---</MYSQL>--- ---<PHPCODE TO INSERT BINARY DATA>----
<?php //for ($i=0,$binary="";$i<255;$i++,$binary.=chr($i)){} for ($i=128,$binary="";$i<160;$i++,$binary.=chr($i)){} $query="insert into Binary_Table (MyData) values ('".mysql_escape_string($binary)."')"; mysql_query($query); ?>
---</PHP>---
I think it is a major bug, because RC3 haven't this problem.
Regards,
-- Steve
Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net http://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
Debugging with Steve's table, I see that, at this line in tbl_replace.php3:
if (isset($fields_prev) && isset($fields_prev[urlencode($key)]) && ("'" . sql_addslashes(urldecode($fields_prev[urlencode($key)])) . "'" == $val)) {
strlen of $val is 34 when using NN4, and 180 when using IE5 !
Marc Delisle a écrit :
Ok, now I can reproduce this bug. It happens in IE 5, not NN4, and you must use the exact script Steve gives us to populate the table (with the empty block in the for loop), which creates one row.
Steve Alberty a écrit :
Hi,
this morning, i have detect a bug with my binary tables. phpMyAdmin convert (destroy) all data from charcode 128 to 160 if you edit and save a row within.
for example the charcode for the euro-symbol chr(128) is converted to html entity €
---<MYSQL TABLE>--- CREATE TABLE Binary_Table ( ID mediumint(8) unsigned NOT NULL auto_increment, MyData blob NOT NULL, PRIMARY KEY (ID) ) TYPE=MyISAM; ---</MYSQL>--- ---<PHPCODE TO INSERT BINARY DATA>----
<?php //for ($i=0,$binary="";$i<255;$i++,$binary.=chr($i)){} for ($i=128,$binary="";$i<160;$i++,$binary.=chr($i)){} $query="insert into Binary_Table (MyData) values ('".mysql_escape_string($binary)."')"; mysql_query($query); ?>
---</PHP>---
I think it is a major bug, because RC3 haven't this problem.
Regards,
-- Steve
Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net http://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net http://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
Hi Marc,
-----Original Message----- Ok, now I can reproduce this bug. It happens in IE 5, not NN4, and you must use the exact script Steve gives us to populate the table (with the empty block in the for loop), which creates one row.
Yes, IE 5 produce strings like "‚ƒ„…†‡" and Mozilla 0.9.2 makes instead "??????????????????"
I think the Blob-Protection it's not browser independent.
Regards,
In tbl_change.php3, the hidden field containing the blob data is not protected in any way, so I guess that's why some browsers react badly.
Even if we protect it, how do we handle the case of $cfgProtectBlob == FALSE
where we have to show the blob contents in the field, and still send something protected to tbl_replace?
Marc
Marc Delisle a écrit :
Steve Alberty a écrit :
Hi,
this morning, i have detect a bug with my binary tables.