#15637 [Com]: if using URI, ldap_connect() returns resource ID when server does not exist
| From: | korte-php at et dot rub dot de | Date: | Fri, 28 Feb 2003 09:52:04 +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-969352002@lists.php.net to get a copy of this message | ||
ID: 15637
Comment by: korte-php at et dot rub dot de
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:
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 :(
Previous Comments:
------------------------------------------------------------------------
[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.
------------------------------------------------------------------------
[2003-01-17 22:26:57] philip@php.net
I cannot get ldap_connect() to return false under ANY conditions,
including with the examples provided in this bug report. I find this
behavior impossible to document, please have another look at this.
Reclassifying -> ldap related.
Shouldn't these return false? They are not URI's:
var_dump(ldap_connect('foo'));
var_dump(ldap_connect('does.not.exist'));
I get resources with both. apache1.3.26/php4.4/openldap2.0.23
------------------------------------------------------------------------
[2003-01-06 11:28:38] martin at kouba dot at
when using an ip address ldap_connect doesn't work as described.
$server = "10.1.1.100";
$port = "389";
$ds = ldap_connect($server, $port);
the result is true even if the server does not exist or the service is
not running.
------------------------------------------------------------------------
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