php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57334 "Cannot Determine LOB Size" from db2_fetch_array and db2_fetch_assoc
Submitted: 2006-10-30 21:58 UTC Modified: 2006-11-27 15:32 UTC
From: larry dot menard at rogers dot com Assigned: kfbombar (profile)
Status: Closed Package: ibm_db2 (PECL)
PHP Version: 5.2.0 RC4 OS: Windows XP, SP2
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: larry dot menard at rogers dot com
New email:
PHP Version: OS:

 

 [2006-10-30 21:58 UTC] larry dot menard at rogers dot com
Description:
------------
(Actually I'm using 5.2.0 RC6, but it's not in the drop-down list.)

After doing a SELECT from a table that has a CLOB column that contains a NULL, a call to either db2_fetch_array() or db2_fetch_assoc() returns an error.

Reproduce code:
---------------
http://cpe0013102da23b-cm0f0079804905.cpe.net.cable.rogers.com/misc/gallery2/g2_cachemap/g2_cachemap.txt

Run this script twice, first passing arg "odbc" (should run clean), then with arg "ibm_db2" (should fail).

An additional symptom, I don't know if it's the same problem... Uncomment the line that inserts the 'x' then run it again.

ODBC gets:

array(1) {
  ["G_VALUE"]=>
  string(1) "x"
}
array(1) {
  ["G_VALUE"]=>
  NULL
}

ibm_db2 gets:

array(1) {
  [0]=>
  string(1) "x"
}
array(1) {
  [0]=>
  string(1) "x"
}

The ibm_db2 output is again wrong.

Expected result:
----------------
Processing statement "DROP TABLE g2_CacheMap"...
Statement execution succesful.

Processing statement "CREATE TABLE g2_CacheMap (g_value CLOB)"...
Statement execution succesful.

Processing statement "INSERT INTO g2_CacheMap (g_value) VALUES (NULL)"...
Statement execution succesful.

Processing statement "SELECT * FROM g2_CacheMap"...
Statement execution succesful.
array(1) {
  ["G_VALUE"]=>
  NULL
}

Actual result:
--------------
Processing statement "DROP TABLE g2_CacheMap"...
Statement execution succesful.

Processing statement "CREATE TABLE g2_CacheMap (g_value CLOB)"...
Statement execution succesful.

Processing statement "INSERT INTO g2_CacheMap (g_value) VALUES (NULL)"...
Statement execution succesful.

Processing statement "SELECT * FROM g2_CacheMap"...
Statement execution succesful.
PHP Warning:  db2_fetch_array(): Cannot Determine LOB Size in C:\MyServer\gallery2\g2_cachemap.php on line 69

Warning: db2_fetch_array(): Cannot Determine LOB Size in C:\MyServer\gallery2\g2_cachemap.php on line 69

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-30 22:00 UTC] pierre dot php at gmail dot com
move to ibm_db2
 [2006-11-01 18:31 UTC] kfbombar at us dot ibm dot com
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.

This bug has been fixed in CVS Head.
 [2006-11-02 07:40 UTC] larry dot menard at rogers dot com
Confirmed, now works.  Thanks Kellen.
 [2006-11-22 14:25 UTC] msheffield at iconfitness dot com
I have the same problem.  How do I fix it?
 [2006-11-27 15:32 UTC] kfbombar at us dot ibm dot com
Upgrade to the latest ibm_db2.  This issue has been resolved with the latest code.
 [2008-05-12 06:44 UTC] robert dot prokopczuk at wp dot pl
I faced with the same problem.

Warning: db2_fetch_array() [function.db2-fetch-array]: Cannot Determine LOB Size in /var/www/html/SERVICE/content/calendar/display.php on line 33

Platform: Linux Fedora Core 8
ibm_db2: 1.6.5
DB2: v9.5

The problem didn't appear with the DB2 version 9.1.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon Sep 23 07:01:27 2019 UTC