Re: Configure PHP 5.2.8 on AIX 5.3 With LDAP

From: Date: Fri, 18 Sep 2009 19:55:30 +0000
Subject: Re: Configure PHP 5.2.8 on AIX 5.3 With LDAP
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-298172@lists.php.net to get a copy of this message
Sounds like you have 64-bit LDAP libraries installed on your system. Do you also have 32-bit libraries installed, but PHP is ignoring them? The --with-ldap configure option tells PHP where to look for ldap.h and libldap.a -- but not directly. Here's the relevant bit from php-src/trunk/ext/ldap/config.m4: if test -f $1/include/ldap.h; then LDAP_DIR=$1 LDAP_INCDIR=$1/include LDAP_LIBDIR=$1/$PHP_LIBDIR So if you say "--with-ldap=/opt/freeware", the configure script is going to look for /opt/freeware/include/ldap.h. If that file exists, it uses "/opt/freeware" to set LDAP_INCDIR and LDAP_LIBDIR, which leads to these two arguments on your gcc command line: -I/opt/freeware/include -> gives gcc another path to find .h files -L/opt/freeware/lib -> gives gcc another path to find .a files If the configure script doesn't find <dir>/include/ldap.h, it fails immediately -- which explains your second two errors. As for the first error, either there isn't an /opt/freeware/lib/libldap.a on your system, or if there is, the 64-bit library that's symlinked in /usr/lib is taking precedence, because gcc ALSO has the argument "-L/usr/lib", and that one shows up on the command line before "-L/opt/freeware/lib": > configure:53825: gcc -o conftest -I/usr/include -g -O2 > -I/opt/freeware/include -L/usr/lib -L/opt/freeware/lib -L/o > pt/freeware/lib conftest.c -lldap -llber -liconv -lm 1>&5 Ben

« previous php.general (#298172) next »