Re: Help! Beginer php+ibm db2 v7.1 on RH6.2

From: Date: Thu, 27 Jul 2000 16:31:34 +0000
Subject: Re: Help! Beginer php+ibm db2 v7.1 on RH6.2
Groups: php.db 
Request: Send a blank email to php-db+get-1577@lists.php.net to get a copy of this message
I had the same problem. the problem is that php can't find the libraries for db2. what I did was copy everything from /home/db2inst1/lib to /usr/lib or some other location, as I couldn't ever get PHP to recognize the location of my db2 libraries. That should fix it for you, it worked for me. I'm not sure if /home/db2inst1/lib is correct, look around for libdb2.so, copy that to /usr/lib, and it should link correctly. The warning at the top is not a big issue, as far as I can tell. Btw, tell me after you're done if the db2 functions return nonsense error messages, I've been having trouble with those. -Ben Zeigler Nobuaki Ishii <boo@dali-lov To: php-db@lists.php.net er.co.jp> cc: Subject: [PHP-DB] Help! Beginer php+ibm db2 v7.1 on RH6.2 07/27/00 12:44 AM Hello. I am a beginer of IBM DB2, and please help me. I have two question. [Q-1] Now I tried to build the Web-RDB system on RHL6.2(kernel-2.2.16-3) with apache1.3.12 + php4.0.1pl2 +IBM DB2 v7.1. But I couldn't compile the php4.0.1pl with configure to the below opition ./configure --with-pgsql=/usr/local/pgsql --enable-track-vars --with-apxs=/usr/local/apache/bin/apxs \ --with-mysql=no --with-regex=apache --with-zlib=/usr --with-pdflib=/usr --with-tiff-dir=/usr/lib \ --with-jpeg-dir=/usr/lib --with-png-dir=no --enable-versioning --with-ibm-db2=/home/db2inst1/sqllib Error message (skip) -I/usr/local/src/php-4.0.1pl2/main -I/usr/local/src/php-4.0.1pl2 -I/usr/local/src/php-4.0.1pl2/main \ -I/usr/local/apache/include -I/usr/local/src/php-4.0.1pl2/Zend -I/usr/local/src/php-4.0.1pl2 \ -I/home/db2inst1/sqllib/include -I/usr/local/src/php-4.0.1pl2/ext/xml/expat/xmltok \ -I/usr/local/src/php-4.0.1pl2/ext/xml/expat/xmlparse -DXML_BYTE_ORDER=12 -g -O2 -c internal_functions.c In file included from /home/db2inst1/sqllib/include/sqlcli1.h:42, from /usr/local/src/php-4.0.1pl2/ext/odbc/php_odbc.h:143, from internal_functions.c:41: /home/db2inst1/sqllib/include/sqlcli.h:718: warning: `ODBCVER' redefined /usr/local/src/php-4.0.1pl2/ext/odbc/php_odbc.h:37: warning: this is the location of the previous definition (skip) make[1]: Leaving directory `/usr/local/src/php-4.0.1pl2/sapi' Making all in . make[1]: Entering directory `/usr/local/src/php-4.0.1pl2' /bin/sh /usr/local/src/php-4.0.1pl2/libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I/usr/local/src/php-4.0.1pl2/ \ -I/usr/local/src/php-4.0.1pl2 -I/usr/local/src/php-4.0.1pl2/main -I/usr/local/apache/include -I/usr/local/src/php-4.0.1pl2/Zend \ -I/usr/local/src/php-4.0.1pl2 -I/home/db2inst1/sqllib/include -I/usr/local/src/php-4.0.1pl2/ext/xml/expat/xmltok \ -I/usr/local/src/php-4.0.1pl2/ext/xml/expat/xmlparse -DXML_BYTE_ORDER=12 -g -O2 -c stub.c /bin/sh /usr/local/src/php-4.0.1pl2/libtool --silent --mode=link gcc -g -O2 -o libphp4.la \ -rpath /usr/local/src/php-4.0.1pl2/libs -export-symbols /usr/local/src/php-4.0.1pl2/sapi/apache/php.sym \ -avoid-version -L/usr/lib/lib -L/usr/local/pgsql/lib -R /usr/lib/lib -R /usr/local/pgsql/lib stub.lo Zend/libZend.la \ sapi/apache/libsapi.la main/libmain.la ext/db/libdb.la ext/gd/libgd.la ext/odbc/libodbc.la ext/pcre/libpcre.la ext/pdf/libpdf.la \ ext/pgsql/libpgsql.la ext/posix/libposix.la ext/session/libsession.la ext/standard/libstandard.la ext/xml/libxml.la ext/zlib/libzlib.la -\ lgdbm -ldb2 -lpam -ldl -lz -lpq -lpdf -ltiff -lpng -lpng -ljpeg -lgd -lresolv -lm -ldl -lcrypt -lnsl -lresolv -lz -L/usr/lib/lib -ljpeg -lpng -L/usr/lib/lib -ltiff /usr/bin/ld: cannot find -ldb2 collect2: ld returned 1 exit status make[1]: *** [libphp4.la] Error 1 make[1]: Leaving directory `/usr/local/src/php-4.0.1pl2' make: *** [all-recursive] Error 1 [Q-2] I tried to compile with php-3.0.15,and success to configure (--with-ibm-db2), make, and make install to apache DSO version. But I couldn't run apache (/usr/local/apache/bin/apachectl start) . Maybe I couldn't set the right environment variables and "sqllib/db2profile". I looked for the infomation on ML and Web page for two days, but I couldn't find them. So,please advice me the hint or imfomation about how to run the apache (DSO version and using bash) with php-3.0.15 and IBM BD2 v7.1 on RHL6.2(kernel-2.2.16-3). Best Regards Media Produce Gala Inc. Nobuaki Ishii -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#1577) next »