php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: madamjak at pobox dot sk
New email:
PHP Version: OS:

 

 [2005-09-21 20:18 UTC] 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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-21 23:14 UTC] sniper@php.net
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


 [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: Sat Dec 21 13:01:31 2024 UTC