I used the "mod_php4-4.0.4pl1-1.src.rpm" from SuSE Linux 7.1 to create a rpm.
Installed Apache: 1.3.19-6
gcc : 2.95.2-149
DB2 Connect Enterprise Edition: V7.1
Add library directories to /etc/ld.so.conf:
1. /usr/IBMdb2/V7.1/lib
2. /usr/IBMdb2/V7.1/include
Connect to db2 under the console of DB2 Connect works!
Modifications in /usr/src/packages/SPECS/mod_php.spec:
1. outcomment all things for roxen and adabase
2. configure-options:
./configure --prefix=/usr --bindir=/usr/bin --libdir=/usr/lib '--with-exec-
dir=%{libdir}/php/bin' --with-mysql=/usr --with-gd=yes --with-tiff-dir=/usr --
with-jpeg-dir=/usr --with-png-dir=/usr --with-xpm-dir=/usr/X11R6 --with-
pdflib=/usr --with-zlib=yes --with-xml --with-ttf --with-ftp --with-curl --with-
gd=yes --with-ibm-db2=/home/db2inst1/sqllib --enable-bcmath --enable-trans-sid --
enable-track-vars --enable-magic-quotes --enable-safe-mode --enable-sockets --
enable-calendar --enable-ftp --enable-memory-limit --with-config-file-
path=/etc/httpd --with-apxs=/usr/sbin/apxs --with-exec-dir=/usr/lib/apache/bin
i386-suse-linux-gnu
Start producing rpm:
rpm bb /usr/src/packages/SPECS/mod_php4.spec
Try to install the rpm:
rpm -i "mod_php4-4.0.4pl1-1.i386.rpm"
When I do this I get the messages:
error: failed dependencies:
/usr/bin/php is needed by mod_php4-4.0.4pl1-1
libdb2.so.1 is needed by mod_php4-4.0.4pl1-11
libstdc++-libc6.1-1.so.2 is needed by mod_php4-4.0.4pl1-1
- the folder "/usr/bin/php" really doesn't exist
- i located the file "libdb2.so.1" in the folder "/usr/IBMdb2/V7.1/lib/"
- i located the file "libstdc++-libc6.1-1.so.2" in the folder "/usr/lib/"
checking "libphp4.so":
Result of the command "ldd /usr/lib/apache/libphp4.so" :
libpng.so.2 => /usr/lib/libpng.so.2 (0x40161000)
libXpm.so.4 => /usr/X11R6/lib/libXpm.so.4 (0x4018c000)
libncurses.so.5 => /lib/libncurses.so.5 (0x4019b000)
libpam.so.0 => /lib/libpam.so.0 (0x401e5000)
libssl.so.0 => /usr/lib/libssl.so.0 (0x401ed000)
libdb2.so.1 => /usr/IBMdb2/V7.1/lib/libdb2.so.1 (0x4021a000)
libdl.so.2 => /lib/libdl.so.2 (0x40a41000)
libz.so.1 => /lib/libz.so.1 (0x40a44000)
libpdf.so.1 => /usr/lib/libpdf.so.1 (0x40a54000)
libtiff.so.3 => /usr/lib/libtiff.so.3 (0x40a7e000)
libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x40ac1000)
libmysqlclient.so.10 => /usr/lib/libmysqlclient.so.10 (0x40ae0000)
libttf.so.2 => /usr/lib/libttf.so.2 (0x40b0f000)
libgd.so.4 => /usr/lib/libgd.so.4 (0x40b37000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x40b68000)
libcurl.so.0 => /usr/lib/libcurl.so.0 (0x40c4b000)
libresolv.so.2 => /lib/libresolv.so.2 (0x40c67000)
libm.so.6 => /lib/libm.so.6 (0x40c78000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x40c96000)
libnsl.so.1 => /lib/libnsl.so.1 (0x40cc4000)
libc.so.6 => /lib/libc.so.6 (0x40cda000)
libcrypto.so.0 => /usr/lib/libcrypto.so.0 (0x40ded000)
libpthread.so.0 => /lib/libpthread.so.0 (0x40ead000)
libstdc++-libc6.1-1.so.2 => /usr/lib/libstdc++-libc6.1-1.so.2
(0x40ec4000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
It seems that the links to the librarys are correct (or not?).
What's the problem?????
On the machine I generated the rpm php is working, but I can't get the connect
to DB2 via PHP.
phpinfo():
ODBC library: db2
ODBC_INCLUDE: -I/home/db2inst1/sqllib/include
ODBC_LFLAGS: -L/home/db2inst1/sqllib/lib
ODBC_LIBS: -ldb2
Error-message when I try connect DB2 via PHP:
Warning: SQL error: , SQL state in SQLConnect in
/usr/local/httpd/htdocs/PHP/connect_test_db2.php on line 10
line 10 in the script: $conn = odbc_connect($dsn,$user,$passwd);
Is there a mistake or is the problem the failed dependencies from the rpm-
installation????
--
__________________________________________________________
News suchen, lesen, schreiben mit http://newsgroups.web.de