DB2_CONNECt and LIBL

General discussion on Zend Server for IBM System i
Post Reply
scubaticus
Posts: 7
Joined: Tue Jun 22, 2010 11:07 am

DB2_CONNECt and LIBL

Post by scubaticus » Tue Jul 06, 2010 4:15 pm

I'm trying to use DB2_CONNECT as follows:

$options = array('i5_libl' => 'LIBA LIBB', 'i5_naming' => DB2_I5_NAMING_ON);
db2_connect($dbname, $user, $pass, $options)

When a file, lets say BUGS is in LIBB, the SQL Select * from BUGS works.
Now, when I add a library LIBC after the LIBB it cannot find the file BUGS

Are there any limitations for the 'i5_libl'? Two libraries doesn't make sense........

segan1
Posts: 7
Joined: Thu Dec 10, 2009 9:22 pm

Re: DB2_CONNECt and LIBL

Post by segan1 » Wed Jul 07, 2010 3:16 pm

As far as I know, there is no limitation on the number of libraries that can be used with db2_connect. However, have you checked if you have the correct version of the ibm_db2 extension? The php.net manual page for the db2_connect function includes the following statement just above the details for the i5_libl option:
The following new i5/OS option is available in ibm_db2 version 1.8.0 and later.


The statement regarding the version requirement for the i5_libl option is easy to miss (we did at first). Also, If I remember correctly, the db2_connect call will still succeed with the i5_libl option, even on ibm_db2 versions prior to 1.8.0. You can check the version of ibm_db2 by checking the output of the phpinfo function. Or In Zend Core, you can access the same information by navigating to the phpinfo page in the Control Center. I'm not sure about Zend Server, as we're still in the process of migrating to that product, but I would imagine it has a similar option.

If you find you do not have the correct version, you could try updating through the Zend Core Control Center. We have had trouble with updates through the Control Center, so we eventually had to contact Zend Support and download and install a patch manually to get ibm_db2 to a version greater than 1.8.0.

Post Reply