how to connect IBM DB2 via odbc_connect?
| From: | Yasuhide OMORI | Date: | Thu, 21 Dec 2000 13:23:53 +0000 |
| Subject: | how to connect IBM DB2 via odbc_connect? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-31421@lists.php.net to get a copy of this message | ||
Hi.
I cannot find out how to connect IBM DB2 via odbc_connect.
What I use are:
Vine Linux 2.0 (derived from RedHat-6.1)
apache-1.3.14
php-4.0.3pl1 (DSO)
DB2 UDB V6.1
I confirmed DB2 actually work because 'db2' command worked and I can
get result of 'SELECT' sentence and so on...
phpinfo() works fine. 'Configure Command' is as follows
'./configure' '--prefix=/usr' '--with-apxs=/usr/sbin/apxs'
'--with-mod_charset=yes' '--with-gd'
'--enable-jstring'
'--with-mysql=/usr' '--with-xml'
'--with-ibm-db2=/usr/IBMdb2/V6.1'
'--with-zlib-dir=/usr'
'--enable-sysvshm=yes' '--enable-sysvsem=yes'
'--with-config-file-path=/etc' '--enable-mbregex'
'--enable-safe-mode=yes' '--enable-track-vars=yes'
'--enable-magic-quotes=yes' '--enable-debugger=yes'
'--enable-bcmath=yes'
'--enable-force-cgi-redirect=yes'
'--enable-discard-path=yes'
'--enable-memory-limit=yes'
'--enable-i18n' '--with-gdbm'
'--enable-versioning'
But I cannot decide 'Data Source Name'. At first I just set IP address
of the server but an error with broken charactors can be seen.
Warning: SQL error: , SQL state N********** in SQLConnect in /home/omori/
public_html/IBMdb2.php on line 15
I set locale to 'C' but the result was all the same.
How 'dsn' should be decided???
--
Yasuhide OMORI