php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58735 Fetch for BLOB => Invalid argument value. (SQLGetData[-11066])
Submitted: 2009-06-23 10:14 UTC Modified: 2009-07-01 02:27 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (50.0%)
From: petr dot havranek at gmail dot com Assigned:
Status: Open Package: PDO_INFORMIX (PECL)
PHP Version: 5.2.9 OS: LINUX
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: petr dot havranek at gmail dot com
New email:
PHP Version: OS:

 

 [2009-06-23 10:14 UTC] petr dot havranek at gmail dot com
Description:
------------
When I make fetch for any BLOB statement, I get error HY009|-11066|[Informix][Informix ODBC Driver]Invalid argument value. (SQLGetData[-11066] at /home/software/PDO_INFORMIX-1.2.6/informix_statement.c:66)). I used PHP 5.2.9, PDO_INFORMIX 1.2.6, clientSDK 2.9 UC4 on Linux and database IBM Informix Dynamic Server Version 9.40.UC7.

Reproduce code:
---------------
$loConn = new PDO("informix:database=db;server=srv_1;", "user", "passwd");
try
{
  // this Select return row
  $lcSQL = "SELECT * FROM t_certbin WHERE c_certbin=1";
  $stm = $loConn->prepare($lcSQL);
  $stm->execute();
  $v =$stm->fetchAll(PDO::FETCH_ASSOC);
  if ($stm->errorCode()!==PDO::ERR_NONE) {
     throw new Exception('FETCH ERROR');
  };
  echo "OK"."<br />";
  var_dump($v);
}
catch (Exception $e)
{
  echo "*".$e->getMessage()."*";
}

Expected result:
----------------
OK
array(1) { [0]=> array(4) { ["C_CERTBIN"]=> string(4) "1" ["C_CERT"]=> string(4) "2" ["B_CERTBIN"]=> resource(2) of type (stream) ["STAV"]=> string(1) "1" } } 

Actual result:
--------------
*FETCH ERROR*

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-06-24 02:24 UTC] petr dot havranek at gmail dot com
I made another few tests: 
Using SELECT with only single (BLOB) column (e.g. SELECT b_certbin FROM ... in our exapmle) or named columns (e.g. SELECT c_certbin, b_certbin FROM ...) doesn't help. Using method $stm->bindColumn() doesn't help too. 
I tried compile PDO with different versions of clientSDK (3.0 UC3 DE and 3.5 UC4 DE) but the problem still resist.
 [2009-07-01 02:27 UTC] abhargav at in dot ibm dot com
Hi,

I am analyzing the issue. Will get back to you if more information is required and update you with the progress.

Regards,
Ambrish Bhargava
 [2015-06-05 14:02 UTC] sillygoose at gmail dot com
I am also getting this bug with the following example code:

$sql = "SELECT * from database_name:table_name";
$stmt = $conn->query($sql, PDO::FETCH_ASSOC);
$data = $stmt->fetch(PDO::FETCH_ASSOC);

The query executes and I can use the result just fine, but it still gives an error.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 04:01:31 2024 UTC