Edit report at http://bugs.php.net/bug.php?id=34525&edit=1
ID: 34525
Comment by: rclerkin at gmail dot com
Reported by: webtech at get-telecom dot fr
Summary: Configuration problem with solaris 10 LDAP
Status: Closed
Type: Bug
Package: LDAP related
Operating System: Solaris 10
PHP Version: 5.0.5
Block user comment: N
Private report: N
New Comment:
I came across the same issue in PHP version 5.3.6
In the configure file the variable PHP_LIBDIR is taken from the argument
--with-libdir. If this is not set it defaults to PHP_LIBDIR=lib
This results in the following code (line 53437 in the configure file)
looking for the ldap libraries in /usr/local/lib or /usr/lib:
#############################
if test "$PHP_LDAP" = "yes"; then
for i in /usr/local /usr; do
if test -f $i/include/ldap.h; then
LDAP_DIR=$i
LDAP_INCDIR=$i/include
LDAP_LIBDIR=$i/$PHP_LIBDIR
elif test -f $i/include/umich-ldap/ldap.h; then
LDAP_DIR=$i
LDAP_INCDIR=$i/include/umich-ldap
LDAP_LIBDIR=$i/$PHP_LIBDIR
elif test -f $i/ldap/public/ldap.h; then
LDAP_DIR=$i
LDAP_INCDIR=$i/ldap/public
LDAP_LIBDIR=$i/$PHP_LIBDIR
fi
done
#############################
If your ldap libraries are in /usr/local/lib64 or /usr/lib64 and youwish
to simply bypass this problem you can hard code the directory into the
configure file as follows which will not affect the PHP_LIBDIR variable
#############################
if test "$PHP_LDAP" = "yes"; then
for i in /usr/local /usr; do
if test -f $i/include/ldap.h; then
LDAP_DIR=$i
LDAP_INCDIR=$i/include
LDAP_LIBDIR=$i/lib64
elif test -f $i/include/umich-ldap/ldap.h; then
LDAP_DIR=$i
LDAP_INCDIR=$i/include/umich-ldap
LDAP_LIBDIR=$i/lib64
elif test -f $i/ldap/public/ldap.h; then
LDAP_DIR=$i
LDAP_INCDIR=$i/ldap/public
LDAP_LIBDIR=$i/lib64
fi
done
#############################
A more elegant solution would be for the configure file to look in both
the lib and lib64 directories for the libraries with an added variable
such as PHP_LIBDIR64=lib64 by default.
Hopefully this will help others having the same issue.
Previous Comments:
------------------------------------------------------------------------
[2005-09-16 14:06:55] [email protected]
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Fix will be in PHP 5.1.
------------------------------------------------------------------------
[2005-09-16 13:59:24] webtech at get-telecom dot fr
Description:
------------
Here is my configuration command :
./configure --prefix=/www/php-5.0.5/ --with-gd
--with-apxs2=/www/apache-2.0.54/bin/apxs --with-mysql=/db/mysql
--with-jpeg-dir=/usr/local/ --enable-gd-native-ttf --enable-gd-imgstrttf
--with-ldap=/usr --with-libxml-dir=/usr --with-zlib-dir=/usr
And I have this result :
configure: error: Cannot find ldap libraries in /usr/lib.
But in my /usr/lib, I've got :
libldap.so -> libldap.so.5
libldap.so.4
libldap.so.5
And when I create a symbolic link libldap.so.3 -> libldap.so.5, the
configuration for LDAP is OK...
Is it a solution for my problem ?
Why the libldap.so.5 is not supported by the ldap extension for PHP ?
Is it possible to change your config.m4 in ext/ldap source folder ?
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=34525&edit=1