#15637 [Com]: if using URI, ldap_connect() returns resource ID when server does not exist
| From: | gsivathanu at msn dot com | Date: | Sun, 04 May 2003 10:17:43 +0000 |
| Subject: | #15637 [Com]: if using URI, ldap_connect() returns resource ID when server does not exist | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969353145@lists.php.net to get a copy of this message | ||
ID: 15637
Comment by: gsivathanu at msn dot com
Reported By: cjm46543 at hotmail dot com
Status: Analyzed
Bug Type: Documentation problem
Operating System: Linux - RedHat 7.2
PHP Version: 4.4.0-dev
New Comment:
So, is there a way to find whether the LDAP server is valid or not ?
Gopalan Sivathanu
Previous Comments:
------------------------------------------------------------------------
[2003-04-01 11:04:14] egeczi at nospamplease dot dist113 dot org
This is not just a documentation problem.
Not only does
$ldap_connection = ldap_connect("does.not.exist")
return a resource id when it obviously shouldn't, but
ldap_bind($ldap_connection, 'username', 'password')
also returns true.
If the actual connect occurs with ldap_bind(), why does it return true
for a server that does not exist?
Regards.
------------------------------------------------------------------------
[2003-02-28 03:52:03] korte-php at et dot rub dot de
Rather anoying though since ldap_bind also fails when using a wrong
password... only looking at bind fails doen't neccessarily mean, that
the ldap server is down :(
------------------------------------------------------------------------
[2003-02-10 12:30:10] sniper@php.net
When openldap 2.x is used, the ldap_connect() does not actually
connect, it just initializes the connecting parameters. The actual
connect happens with next calls
to ldap_* funcs, usually it is 'ldap_bind()'.
This is just documentation problem. Not any bug in code.
------------------------------------------------------------------------
[2003-01-24 19:51:01] philip@php.net
Yes, I still get ldap resources everytime except when passing in "/" or
a wrong parameter count.
------------------------------------------------------------------------
[2003-01-20 16:12:25] iliaa@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
With latest CVS it returns FALSE when appropriate, cannot replicate the
problem.
------------------------------------------------------------------------
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/15637
--
Edit this bug report at http://bugs.php.net/?id=15637&edit=1