ibm_db2.so extension problem "Cannot Determine LOB Size"

General discussion on Zend Server for IBM System i
Post Reply
echodelta
Posts: 6
Joined: Wed Dec 01, 2010 4:21 am

ibm_db2.so extension problem "Cannot Determine LOB Size"

Post by echodelta » Wed Feb 23, 2011 8:10 pm

Hello,

We've got really unpleasant problem with moving to ZendServer from ZendCore which affects business applications.

Before we were running ZendCore on IBM i V5R4, with ibm_db2.so version 1.6.4 and used CLOB/BLOB field types in DB2 without problems.

Now we moved to IBM I V7R1, with ZendServer version 5.0.0 (ibm_db2.so version 1.8.3) and having problems with fetching data from BLOB fields.

Here is a code:

Code: Select all

    $connect_id = db2_connect('*LOCAL', 'VASYA', 'pupkin);
    $rs = db2_exec($connect_id, 'SELECT DS_DATA FROM LIBWEB.DATA_STORE FETCH FIRST 1 ROW ONLY');
    $ln = db2_fetch_assoc($rs);
This code gives this error:

db2_fetch_assoc() [function.db2-fetch-assoc]: Cannot Determine LOB Size

Here is table structure:

Code: Select all

CREATE TABLE LIBWEB.DATA_STORE ( 
	DS_ID INTEGER GENERATED ALWAYS AS IDENTITY ( 
	START WITH 1 INCREMENT BY 1 
	NO MINVALUE NO MAXVALUE 
	NO CYCLE NO ORDER 
	CACHE 20 ) 
	, 
	DS_KEY CHAR(40) CCSID 37 DEFAULT NULL , 
	DS_EXP INTEGER DEFAULT NULL , 
	DS_USER VARCHAR(32) CCSID 37 DEFAULT NULL , 
	DS_DATA BLOB(16777216) DEFAULT NULL
); 
Please note, that data in BLOB field has no NULL symbol '\x00' in it. I experimented with both binary and text data being stored in BLOB.

Same problem happens with CLOB field.

I searched in Google for 'Cannot Determine LOB Size' and looks like problem is reported as bug back to 2006 and bug is alreadty closed (http://pecl.php.net/bugs/bug.php?id=9194).

I also tried to replace extension file 'ibm_db2.so' version 1.8.4 taken from ZendServer 5.0.2, still the same problem.

Does anyone know what can cause this problem?
Can upgrade to ZendServer 5.0.4 with ibm_db2.so version 1.9.0 solve this problem?

Thanks,
Arthur.

zend_i5
Posts: 158
Joined: Mon Mar 23, 2009 5:22 pm

Re: ibm_db2.so extension problem "Cannot Determine LOB Size"

Post by zend_i5 » Thu Feb 24, 2011 10:27 am

I think there is a DB2 PTF for V7R1 that solves this issue.

tfunari
Posts: 1
Joined: Tue Apr 07, 2009 4:27 pm

Re: ibm_db2.so extension problem "Cannot Determine LOB Size"

Post by tfunari » Mon Jul 11, 2011 1:35 pm

I am having the same problem. Did you ever resolve this issue? Thanks.

Post Reply