I have PHP 3.0.15 compiled with IBM-DB2 support running on TurboLinux 6.0 with Apache 1.3.12. Phpinfo() shows me that the option ibm-db2 is compiled.
When I try to connect to the remote database(DB2 UDB v7.1 workgroup edition) with:
$cid = odbc_connect("ibase2", "db2inst1", "ibmdb2");
php gives me the SQLState error message with garbage characters although I set the envirionment those are from db2profile/db2cshrc files before connect:
putenv ("DB2DIR=/usr/IBMdb2/V7.1");
putenv ("DB2INSTANCE=db2inst1");
putenv ("INSTHOME=/home/db2inst1");
putenv ("LD_LIBRARY_PATH=/home/db2inst1/sqllib/lib");
putenv ("LIBPATH=/home/db2inst1/sqllib/lib");
The remote node and database are cataloged on the web server and the remote database name is "ibase2" which I send as the first parameter of the odbc_connect function.
I confirmed DB2 works fine by getting the result of 'select' sentence on the command line of the web server also.
Any help is appreciated.
Regards,
ari
When I try to connect to the remote database(DB2 UDB v7.1 workgroup edition) with:
$cid = odbc_connect("ibase2", "db2inst1", "ibmdb2");
php gives me the SQLState error message with garbage characters although I set the envirionment those are from db2profile/db2cshrc files before connect:
putenv ("DB2DIR=/usr/IBMdb2/V7.1");
putenv ("DB2INSTANCE=db2inst1");
putenv ("INSTHOME=/home/db2inst1");
putenv ("LD_LIBRARY_PATH=/home/db2inst1/sqllib/lib");
putenv ("LIBPATH=/home/db2inst1/sqllib/lib");
The remote node and database are cataloged on the web server and the remote database name is "ibase2" which I send as the first parameter of the odbc_connect function.
I confirmed DB2 works fine by getting the result of 'select' sentence on the command line of the web server also.
Any help is appreciated.
Regards,
ari