php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34525 Configuration problem with solaris 10 LDAP
Submitted: 2005-09-16 13:59 UTC Modified: 2005-09-16 14:06 UTC
From: webtech at get-telecom dot fr Assigned:
Status: Closed Package: LDAP related
PHP Version: 5.0.5 OS: Solaris 10
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: webtech at get-telecom dot fr
New email:
PHP Version: OS:

 

 [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 ?


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-16 14:06 UTC] sniper@php.net
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.

 [2011-05-06 17:59 UTC] rclerkin at gmail dot com
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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 17:01:58 2024 UTC