Re: ibm db2 and php

From: Date: Fri, 28 Jul 2000 06:51:15 +0000
Subject: Re: ibm db2 and php
Groups: php.db 
Request: Send a blank email to php-db+get-1590@lists.php.net to get a copy of this message
Hi There are few things to consider 1. I use php4 (last version) and I compile it --with-ibm-db2 option (before you must set LDFLAGS). 2. I put my odbcinst.ini and odbc.ini in /etc directory, since you will be connecting to system wide DSN's anyway.... 3. My .odbc.ini file is: [sample] Description = Test to DB2 Driver = DB2 and my odbcinst..ini file is: [ODBC] Trace = Yes Trace File = /tmp/sql_trace.log [DB2] Description = DB2 driver Driver = /usr/IBMdb2/V6.1/lib/libdb2.so FileUsage = 1 DontDLClose = 1 4. make sure you have DB@INSTANCE variable set up....the best thing to do is to execute "#. /home/db2inst1/sqllib/db2prifile" or put the equivalent into /etc/profile so evryone will be able to use it.... 6. Your odbcinst.ini driver must be libdb2.so: it's a shared lib; db2.o comes on AIX flavor..... I hope this helps.... Mirko. > On July 11, you posted a message on the php-db mailing list with the > following question: > > > If I write on a shell "php odbc.php3", there is the connection to > > database sample and right results appear. But if open a Netscape and > > open location > > "http://localhost.localdomain/odbc.php3" the results are: > > [...] > > My problem is: why does it work on shell and not on Netscape? > > Where can I find db2.o? > > Always thanks a lot. Mirko > > I have gone through the same process today and gotten the same results. > Did you ever find a solution? I have also noticed that the garbage I > get is not the same every time. > > thanks, > Kelly > -- > Kelly Setzer, Interstitial Engineering, Ingram Entertainment, Inc. > (615)287-4863 kelly.setzer@ingramentertainment.com > http://www.ingramentertainment.com > "Only those who dare to fail greatly can ever achieve greatly." -- JFK > >

« previous php.db (#1590) next »