PHP 4.0 Bug #6072: ldap library missing from libphp4.so - shows up when apache is started.
| From: | karen dot turner at opus dot co dot nz | Date: | Thu, 10 Aug 2000 12:03:13 +0000 |
| Subject: | PHP 4.0 Bug #6072: ldap library missing from libphp4.so - shows up when apache is started. | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-28338@lists.php.net to get a copy of this message | ||
From: karen.turner@opus.co.nz
Operating system: Solaris 2.6
PHP version: 4.0.1pl2
PHP Bug Type: Installation problem
Bug description: ldap library missing from libphp4.so - shows up when apache is started.
When starting apache I got the following error. It turns out the ldap
library is not being linked in - the ldd output below shows this. The ldap
library is missing from the .la files - again shown below.
I can't work out how to fix it - work around is to load the php3 module as
well.
Starting the Apache Web Server.
Syntax error on line 228 of /opt/serv/etc/httpd.conf:
Cannot load /opt/serv/libexec/libphp4.so into server: ld.so.1: /opt/serv/sbin/httpd: fatal:
relocation error: file /opt/serv/libexec/libphp4.so: symbol ldap_unbind_s: referenced symbol not
found
Segmentation Fault
I use
./configure --with-apxs=/opt/serv/sbin/apxs --enable-versioning --with-mysql=/opt/mysql
--prefix=/opt/php --with-exec-dir=/opt/serv/libexec/ --with-db2 --with-gd --with-ttf=/opt/serv
--with-ldap=/opt/serv --with-zlib=/opt/gnu --with-pgsql=/opt/serv --enable-sysvsem --enable-sysvshm
--with-yp --enable-ftp --with-config-file-path=/opt/php/etc --with-gdbm=/opt/gnu
However when it is loaded into apache the ldap library is missing. ldd
shows that it is not referenced in libphp4.so.
ldd libphp4.so
libgdbm.so => /opt/gnu/lib/libgdbm.so
libpam.so.1 => /usr/dt/lib/libpam.so.1
libdl.so.1 => /usr/lib/libdl.so.1
libz.so => /opt/gnu/lib/libz.so
libpq.so => /opt/serv/lib/libpq.so
libmysqlclient.so.6 => (file not found)
libttf.so.2 => /opt/serv/lib/libttf.so.2
libgd.so => /opt/serv/lib/libgd.so
libpng.so.2 => /opt/serv/lib/libpng.so.2
libresolv.so.2 => /usr/lib/libresolv.so.2
libm.so.1 => /usr/lib/libm.so.1
libnsl.so.1 => /usr/lib/libnsl.so.1
libsocket.so.1 => /usr/lib/libsocket.so.1
libc.so.1 => /usr/lib/libc.so.1
libmp.so.2 => /usr/lib/libmp.so.2
When I checked the libphp4.la file it was missing from there - which
explains why ldd doesn't find it.
portion of libphp4.la file ahoinf rhw miaainf ldap library:
....
# Libraries that this one depends upon.
dependency_libs=' -R/usr/ucblib -R/opt/gnu/lib -R/usr/local/lib -R/opt/serv/lib
-R/opt/mysql/lib/mysql -L/usr/ucblib -L/opt/gnu/lib -L/usr/local/lib -L/opt/serv/lib
-L/opt/mysql/lib/mysql -lgdbm -lpam -ldl -lz -lpq -lmysqlclient -lttf -lgd -lpng -ldb -lgdbm
-lresolv -lresolv -lm -ldl -lcrypt -lnsl -lsocket -lsocket -lgdbm -lpam -ldl -lz -lpq -lmysqlclient
-lttf -lgd -lpng -ldb -lgdbm -lresolv -lresolv -lm -ldl -lcrypt -lnsl -lsocket -lsocket'
# Version information for libphp4.
....
I wasn't sure how to get this added. I noticed that it was missing from
the Makefile in Zend.
libZend_la_LDFLAGS = -lgdbm -lpam -ldl -lz -lpq -lmysqlclient -lttf -lgd -lpng
-ldb -lgdbm -lresolv -lresolv -lm -ldl -lcrypt -lnsl -lsocket -lsocket
I didn't notice the problem until I stopped loading the php3 library into
apache.
I tried building without --enable-versioning, however the problem still
remained.