|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16901 ldap_bind no longer works
Submitted: 2002-04-29 08:23 UTC Modified: 2002-06-26 08:34 UTC
From: macchi at in2p3 dot fr Assigned:
Status: Closed Package: LDAP related
PHP Version: 4.2.0 OS: Solaris 8
Private report: No CVE-ID: None
 [2002-04-29 08:23 UTC] macchi at in2p3 dot fr
After have upgrade my PHP distribution from versin 4.1.2 to 
version 4.2.0, the ldap_bind function no longer works :

My script is :

define("LDAP_HOSTNAME", "");
define("LDAP_BASEDN", "o=in2p3, c=fr");
$cid = ldap_connect(LDAP_HOSTNAME);
echo ldap_search($cid, LDAP_BASEDN, "(objectclass=*)");

It perfacly works whith php 4.1.2. 
With 4.2.0 I get the following error :

Warning: LDAP: Unable to bind to server: Can't contact LDAP 
server in /sites/webtest/htdocs/ldap/test.php on line 13 
(which is the line number of ldap_bind instruction).

Obviously I didn't change anything in the OpenLDAP release 
I use nor in the compiler (Sun cc).


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-29 08:27 UTC]
And exactly the same script works with 4.1.2 ?

If so, this _may_ be related to an autoconf bug we had also with mysql in the 4.2.0 release, though I'm not sure.

Can you try deleting the ./configure script in php-4.2.0 and rerun ./buildconf with autoconf 2.13 ?
 [2002-04-29 09:03 UTC] macchi at in2p3 dot fr
I remove the configure script and rebuild it with builconf 

buildconf: checking installation...
buildconf: autoconf version 2.52 (ok)
buildconf: automake version 1.5 (ok)
buildconf: libtool version 1.4.2 (ok)
rebuilding configure
rebuilding main/

I rebuilt and reinstalled by I keep on getting the same 
 [2002-04-29 09:07 UTC]
You have to to use autoconf >2.13< . It's all about that autoconf 2.52 with which the original ./configure script was built seems to be buggy (or some bug in, whatever)
 [2002-04-29 09:50 UTC] macchi at in2p3 dot fr
Ok : I tried again with Autoconf 2.13 but the issue 
persists !
 [2002-06-21 15:31 UTC]
What LDAP library are you using? Might be some conflict
between the library you're using and LDAP stuff that
comes with Solaris 8. Perhaps PHP 4.2.0 isn't linked
with the same libraries or in the same order as 4.1.2.
You could also check what phpinfo() says about the lib
 [2002-06-26 08:34 UTC] macchi at in2p3 dot fr
Sorry for having not reply earlier !
I did resolve this problem : it was due to the 
--with-oracle configure option. It seems that this option 
mismatch with the --with-ldap one : I set both to the path 
to my Oracle client and now the LDAP support in PHP is 
fully operationnal.
So I you can't do it another way it would be nice to 
precise in the doc that if the LDAP support is wanted in 
the same time than the Oracle one, the values of the 
relative configure options should be the same.
Speaking about Oracle support : when the oracle 9i support 
will be available ?

Thanks for all .
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Mar 02 08:01:29 2024 UTC