|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34586 BYTE input and output problem
Submitted: 2005-09-21 20:18 UTC Modified: 2005-09-29 01:00 UTC
From: madamjak at pobox dot sk Assigned:
Status: No Feedback Package: Informix related
PHP Version: 5.0.5 OS: Solaris 2.8
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2005-09-21 20:18 UTC] madamjak at pobox dot sk
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:

// creating persistent connection to Informix ver 10.0
// lines deleted

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 ...";
$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);

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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-21 23:14 UTC]
Please try using this CVS snapshot:
For Windows:

 [2005-09-29 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Feb 25 03:01:28 2024 UTC