[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Ldap with Php





--On Friday, March 07, 2003 10:18 PM -0300 Marcone Luis Theisen <marcone@univates.br> wrote:

Well,
I'm export the /usr/local/lib

echo $LD_LIBRARY_PATH
/usr/local/lib:/lib:/usr/lib

Removed the libphp4
rm /usr/local/apache/libexec/libphp4.so

recompiled the PHP.
make clean
./configure --includedir=/usr/local/include --with-ldap
--with-apxs=/usr/local/apache/bin/apxs make
make install
cp php.ini-dist /usr/local/lib/php.ini

In the file config.log of Php:

configure:31432: checking for LDAP support
configure:32975: checking for 3 arg ldap_set_rebind_proc
configure:32987: gcc -c -g -O2  -DLINUX=22 -DUSE_HSREGEX -DUSE_EXPAT
-I/usr/include conftest.c 1>&5 configure: In function `main':
configure:32983: too many arguments to function `ldap_set_rebind_proc'
configure: failed program was:
# line 32980 "configure"
# include "confdefs.h"
# include <ldap.h>
int main() {
ldap_set_rebind_proc(0,0,0)
; return 0; }
configure:33011: checking for ldap_parse_reference
configure:33039: gcc -o conftest -g -O2  -DLINUX=22 -DUSE_HSREGEX
-DUSE_EXPAT  conftest.c -lcrypt -lresolv -lm -ldl -lnsl  -lresolv -lcrypt
1>&5 /tmp/ccOfgNXw.o: In function `main':
/usr/local/src/php-4.2.3/configure:33036: undefined reference to
`ldap_parse_reference' collect2: ld returned 1 exit status
configure: failed program was:
# line 33016 "configure"
# include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char ldap_parse_reference(); below.  */
# include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char ldap_parse_reference();


My ldd of libphp4.so:

 ldd /usr/local/apache/libexec/libphp4.so
        libdl.so.2 => /lib/libdl.so.2 (0x40131000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x40134000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x40161000)
        libm.so.6 => /lib/libm.so.6 (0x40171000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x40192000)
        libc.so.6 => /lib/libc.so.6 (0x401a7000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

The libldap not found.

The problem continue....
 /usr/local/apache/bin/apachectl start
Syntax error on line 205 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/libphp4.so into server:
/usr/local/apache/libexec/libphp4.so: undefined symbol: ldap_value_free
/usr/local/apache/bin/apachectl start: httpd could not be started

Any ideas ?

Hm,

I didn't mean recompile PHP. ;) Where do you have your openldap libs installed. You probably want to add flags to the PHP compile to look in <openldap-path>/libs to find the openldap library while compiling. --libdir=/usr/local/lib or something like that (I haven't played with compiling PHP).

--Quanah

--
Quanah Gibson-Mount
Senior Systems Administrator
ITSS/TSS/Computing Systems
Stanford University
GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html