note 31074 added to function.ldap-bind
| From: | yli at wtwh dot com dot cn | Date: | Wed, 09 Apr 2003 02:15:29 +0000 |
| Subject: | note 31074 added to function.ldap-bind | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-46385@lists.php.net to get a copy of this message | ||
error on my use ldap_connect and ldap_bind,
I can get a source ID every time, just like the following :
////////////////////////////////////////////////////////
$ds = "";
$ds=ldap_connect("ldap://fw2/","389");
if ($ds) {
echo "connected ".$ds."<p>";
echo "Binding ...";
$rdn = 'dc=validatecert,dc=wtwhpki';
$passwd = 'secret';
$r=ldap_bind($ds,$rdn,$passwd);
if(!$r){
echo "ldap_bind error!";
exit();
}
}
/////////////////////////////////////////////////////
the result is :
//////////////////////////////////////////
connected Resource id #2
Binding ...
Warning: ldap_bind(): Unable to bind to server: Can't contact LDAP server in
/var/pki/htdocs/testforldap.php on line 12
ldap_bind error!
********************************************
version php-4.3.1 with v 1.25
rot php-ldap, I decide not to use it ,alter to use shell cmd .
--
http://www.php.net/manual/en/function.ldap-bind.php
http://master.php.net/manage/user-notes.php?action=edit+31074
http://master.php.net/manage/user-notes.php?action=delete+31074
http://master.php.net/manage/user-notes.php?action=reject+31074