Re: how to connect IBM DB2 via odbc_connect?

From: Date: Sat, 06 Jan 2001 01:23:45 +0000
Subject: Re: how to connect IBM DB2 via odbc_connect?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-32994@lists.php.net to get a copy of this message
In article <20001221222353.B20286@omori.m-t.com>, "Yasuhide OMORI" <omori@m-t.com> wrote: Does the webserver have the DB2 client pack installed? During this installation, you create a DB2 user. The apachectl file (at least this is where we do it) includes a line to source the 'db2profile' of the user created by the DB2 client pack. email me for more detail Jeff > 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??? > >

« previous php.general (#32994) next »