Page 1 of 1
Php and db2
Posted: Wed Jan 22, 2003 10:12 am
by pablo_k
Hi
I have a problem with the odbc_connect function when i try to connect with a IBM db2 database.
I'm using Red Hat Linux 7.1 with php and apache.
When odbc_connect executes, apache web server doesn't show the page and the /usr/local/apache/log/error_log shows:
/usr/local/apache/bin/httpd: error while loading shared libraries: /usr/local/apache/bin/httpd: undefined symbol: SQLAllocEnv
Any idea??
Thanks
Pablo_k
Posted: Fri Jan 24, 2003 1:37 am
by thomaska
Did you install the DB2 Client (including ADT) on the Apache Server and recompile PHP?
Posted: Fri Jan 24, 2003 7:56 am
by pablo_k
Hi:
I have installed the next modules:
DB2 Administration Client
DB2 UDB enterprise edition
DB2 connect enterprise edition
DB2 Application Development client
and i have recompiled php with apache:
php:
./configure --with-ibm-db2=/usr/IBMdb2/V7.1 --with-mysql --with-apache=/usr/src/apache_1.3.27
apache:
./configure --activate-module=src/modules/php4/libphp4.a
...and don't work.
Posted: Fri Jan 24, 2003 6:14 pm
by fractalvibes
I'd suggest asking at comp.databases.ibm-db2 also.
A number of IBMer's give advice, etc. and may know the solution right off the bat. Be sure and tell them the version of DB2 and any other pertinant
info.
I use Db2, but with ASP, so don't know what issues you may have with Linux.
Anyway, good luck! Let us know how/if you resolve the issue.
Phil J.
Posted: Wed Jan 29, 2003 9:49 am
by thomaska
Did you define in db2 a "connection" to the database and did you include
....
# DB2 Konfiguration:
#
. /home/db2inst1/sqllib/db2profile
#
....
into your apache start script?
This will set all environment variables well for db2.
Posted: Tue Sep 09, 2003 3:52 pm
by d-m
I remember that I have already explain at
http://www.php.net years ago how to compile php with db2... please check at these link :
http://www.php.net/manual/en/function.odbc-connect.php
At the comments of the funcion... It has the solution!
I hope it could help U