|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-09-16 13:59 UTC] 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 ? PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 12:00:01 2025 UTC |
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.