can I use php+iodbc+ibm db2
| From: | jjiang | Date: | Wed, 23 Feb 2000 07:38:43 +0000 |
| Subject: | can I use php+iodbc+ibm db2 | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-15814@lists.php.net to get a copy of this message | ||
Hi,
I wanted to interface my IBM DB2 server with an PHP3 application
Unfortunately I've many problems:
The enviroment I have been using is:
--- Aix 4.3.2
--- Db2 5.0 server for Aix
--- php3.0
--- iodbc 2.50.3
when I configure php,I used this statement:
./configure --prefix=/usr/local --with-iodbc-inidir=/usr/lpp/db2_05_00/libodbc
My odbc.ini
[ODBC Data Sources]
SAMPLE=IBM DB2 ODBC DRIVER
[SAMPLE]
Driver=/u/thisuser/sqllib/lib/db2.o
UserName=userid
Password=userid
Database=smis
[ODBC]
Trace=0
TraceFile=odbctrace.out
InstallDir=/u/thisuser/sqllib/odbclib
[Default]
Driver=/u/thisuser/sqllib/lib/db2.o
my test.php3:
<html>
<?php echo
$conn_id=odbc_connect("DSN=SAMPLE","userid","userid");?>
</html>
The Result is
Warning: SQL error: [iODBC][Driver Manager]Data source name not found
and no default driver specified. Driver could not be loaded, SQL state IM002
in SQLConnect in /usr/lpp/internet/server_root/cgi-bin/test.php3 on line 3
can anyone help me ?
thank you!