ID: 34586 Updated by: [EMAIL PROTECTED] Reported By: madamjak at pobox dot sk -Status: Open +Status: Feedback Bug Type: Informix related Operating System: Solaris 2.8 PHP Version: 5.0.5 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip Previous Comments: ------------------------------------------------------------------------ [2005-09-21 20:18:52] madamjak at pobox dot sk Description: ------------ I want to put and get binary data to column type of binary BLOB (not Smart BLOB). When I put binary data that contain bytes with ASCII code between 127-255 into BLOB column and after this I get this same data from this same BLOB column this data are changed. These changes are probably same as changes for codepages transformation. My aplication works in Slovak locales. When I put binary data into this BYTE column from PC by MS Access and get by php function ifx_get_blob the data was correct. Reproduce code: --------------- <?php // creating persistent connection to Informix ver 10.0 // lines deleted $upfile='//usr//local//apache//htdocs//test//upload//asci_input.txt'; echo $upfile.'<BR>'; $blobid = ifx_create_blob(1, 1, $upfile); $blobidarray[] = $blobid; $resid = ifx_query ("INSERT INTO test (ID, OBJEKT) VALUES(0,?)", $link, $blobidarray); if (! $resid) { // echo ".... Error messages ..."; die; } $sqlca = ifx_getsqlca ($resid); $serial_value = $sqlca["sqlerrd1"]; $resid = ifx_query ("SELECT * FROM test WHERE ID='$serial_value'", $link); $row = ifx_fetch_row ($resid, "NEXT"); $obsah = ifx_get_blob($row[objekt]); $fp = FOpen("//usr//local//apache//htdocs//test//upload//asci_output.txt", "wb+") or die("I can not create file"); FWrite($fp, $obsah); Fclose($fp); ?> Expected result: ---------------- I except that ascii_input.txt and ascii_output.txt have to have same content. Actual result: -------------- Content of ascii_input.txt and ascii_output.txt is different. Bytes with ascii codes are changed. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=34586&edit=1