By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,279 Members | 1,680 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,279 IT Pros & Developers. It's quick & easy.

configure PHP with IBM-DB2

P: n/a
Hi All,

I am trying to configure php with IBM-DB2 and I get the following
error:

checking for IBM DB2 support... no
configure: error:
build test failed. Please check the config.log for details.
You need to source your DB2 environment before running PHP configure:
# . $IBM_DB2/db2profile

The command I use to configure is # ./configure
--with-mysql=/srv/mysql/mysql-standard-5.0.24a-linux-i686-glibc23
--with-apxs2=/srv/apache-2058/apache/bin/apxs
--with-ibm-db2=/opt/IBM/db2/V8.1
--with-pdo-odbc=ibm-db2,/home/db2inst1/sqllib

What am I doing wrong here?

Thanks,

Brent

Sep 21 '06 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Brent Halsey wrote:
Hi All,

I am trying to configure php with IBM-DB2 and I get the following
error:

checking for IBM DB2 support... no
configure: error:
build test failed. Please check the config.log for details.
You need to source your DB2 environment before running PHP configure:
# . $IBM_DB2/db2profile

The command I use to configure is # ./configure
--with-mysql=/srv/mysql/mysql-standard-5.0.24a-linux-i686-glibc23
--with-apxs2=/srv/apache-2058/apache/bin/apxs
--with-ibm-db2=/opt/IBM/db2/V8.1
--with-pdo-odbc=ibm-db2,/home/db2inst1/sqllib

What am I doing wrong here?
First, you should make sure not to use the PHP ODBC driver. That driver has
a whole bunch of problems. There is a specific DB2 driver that fares much
better. Make sure that you use it.

Next, have you sourced the /home/db2inst1/sqllib/db2profile before running
the configure?

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Sep 21 '06 #2

P: n/a
Perhaps this is part of my problem, what is meant by 'source' the
/home/db2inst1/sqllib/db2profile ?
Knut Stolze wrote:
Next, have you sourced the /home/db2inst1/sqllib/db2profile before running
the configure?
Sep 21 '06 #3

P: n/a
Brent Halsey wrote:
Perhaps this is part of my problem, what is meant by 'source' the
/home/db2inst1/sqllib/db2profile ?
Run this:

$ source /home/db2inst1/sqllib/db2profile

or

$ . /home/db2inst1/sqllib/db2profile

Note the dot '.' in front of the filename.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Sep 21 '06 #4

P: n/a
I ran source /home/db2inst1/sqllib/db2profile and then tried to
conifgure again and it appears to be working, my box is pretty slow.
I'll try to do the make and make install and let you know how it goes.
What needs to be done to the php.ini file?
Thanks!

Sep 21 '06 #5

P: n/a
The php.ini file should have the following contents added after the
make install:

extension=ibm_db2.so
Brent Halsey wrote:
I ran source /home/db2inst1/sqllib/db2profile and then tried to
conifgure again and it appears to be working, my box is pretty slow.
I'll try to do the make and make install and let you know how it goes.
What needs to be done to the php.ini file?
Thanks!
Sep 21 '06 #6

P: n/a
Thank you for all of your help. Everything is working now =) Cheers!

Sep 21 '06 #7

P: n/a
Ian
Brent Halsey wrote:
Hi All,

I am trying to configure php with IBM-DB2 and I get the following
error:

checking for IBM DB2 support... no
configure: error:
build test failed. Please check the config.log for details.
You need to source your DB2 environment before running PHP configure:
# . $IBM_DB2/db2profile

The command I use to configure is # ./configure
--with-mysql=/srv/mysql/mysql-standard-5.0.24a-linux-i686-glibc23
--with-apxs2=/srv/apache-2058/apache/bin/apxs
--with-ibm-db2=/opt/IBM/db2/V8.1
--with-pdo-odbc=ibm-db2,/home/db2inst1/sqllib
FYI, you probably want to use the ibm_db2 PECL module instead of the
bundled module -- it's written by IBM and doesn't use the unified ODBC
drivers.

Plus it's a lot easier to install it using pear.

http://pecl.php.net/package/ibm_db2/

Sep 21 '06 #8

This discussion thread is closed

Replies have been disabled for this discussion.