We have installed Redhat 7.1
and the Korn shell with rpm
after adapting the pathes with softlinks we´ve installed successfully the IBM DB2Connect Personal Edition for Linux
compiled the newest stable version of PHP with "./configure --without-mysql --with-ibm-db2[=DIR]"
additionally we created and edited the .odbc.ini file in the home directory of the user /home/root:
[IBMDB2]
Driver=/usr/IBMdb2/V7.1/lib/libdb2.so
Description=SAMPLE DB2 ODBC Database
Host = <ip address>
ServerType = DB2
FetchBuffersize = 60
Database = <DB name>
UserName = <user name>
Password = <password>
and edited the obcinst.ini file
[IBMDB2]
Driver=/usr/IBMdb2/V7.1/lib/libdb2.so
The connection to the remote Database with:
$Link_ID=odbc_connect($dsn,$user,$password);
$Query_ID = odbc_do($Link_ID,"SELECT * FROM PMNTESTDTA.KASTAM");
$i=1;
$res=odbc_fetch_row($Query_ID,$i);
while($res)
{
print("A:".odbc_result($Query_ID,"a")." B:".odbc_result
($Query_ID,"b")."");
$res=odbc_fetch_row($Query_ID,$i);
}
odbc_free_result($Query_ID );
odbc_Close($Link_ID);
didn´t work, so I am asking what the hell is wrong with me, IBM or the DB2??
Thanks for hints how to solve this problem
Karl Prinz