#29651 [Opn->Bgs]: ldap_bind doesn�t work but ldap_connect works!
| From: | vrana@php.net | Date: | Tue, 17 Aug 2004 07:52:24 +0000 |
| Subject: | #29651 [Opn->Bgs]: ldap_bind doesn�t work but ldap_connect works! | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969363251@lists.php.net to get a copy of this message | ||
ID: 29651
Updated by: vrana@php.net
Reported By: Alex_Diedler at gmx dot de
-Status: Open
+Status: Bogus
Bug Type: Documentation problem
Operating System: Linux Suse 9.0
PHP Version: 4.3.8
New Comment:
This is already documented: "When OpenLDAP 2.x.x is used,
ldap_connect() will always return a resource as it does not actually
connect but just initializes the connecting parameters. The actual
connect happens with the next calls to ldap_* funcs, usually with
ldap_bind()."
Previous Comments:
------------------------------------------------------------------------
[2004-08-17 09:42:37] derick@php.net
Not a bug in PHP, it is something for the docs though
------------------------------------------------------------------------
[2004-08-17 09:35:07] Alex_Diedler at gmx dot de
Hello,
The problem doesn´t seems to be in PHP. It´s a problem with the LDAP
and SASL.
From the bug-database:
When you use OpenLDAP 2 or other libraries that use the
new LDAP API, ldap_connect() will only create some state
on the client, the server is not contacted until you later
do an LDAP operation like search or bind. There are no DNS
lookups either, so ldap_connect("jlkdsfjsdk") will be
successful. This means that ldap_connect() will almost
always return true, while later operations might very well fail.
Another difference worth noting, is that for anonymous
access there is no more need for ldap_bind(). You just
do your search.
This thread can be closed.
Thanks and greetings
Alexander
------------------------------------------------------------------------
[2004-08-17 08:16:42] derick@php.net
No need to shout here and how do you expect us to reproduce the problem
without an LDAP server?
------------------------------------------------------------------------
[2004-08-17 07:26:09] Alex_Diedler at gmx dot de
Hello!
This URL is NOT A PUBLIC URL! Nobody can connect to it from outside!
------------------------------------------------------------------------
[2004-08-17 00:18:59] iliaa@php.net
Cannot reproduce with my ldap servers, the specified
hostname for your ldap server cannot be resolved.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/29651
--
Edit this bug report at http://bugs.php.net/?id=29651&edit=1