★ wanayoo — archive 1999 http://www.php.net/manual/function.ldap-bind.phpNouvelle recherche | Portail wanayoo

PHP Home Page

Manual Table of Contents
Up to LDAP
Quick Reference
LDAP
* Introduction to LDAP
* ldap_add
* ldap_mod_add
* ldap_mod_del
* ldap_mod_replace
* ldap_bind
* ldap_close
* ldap_connect
* ldap_count_entries
* ldap_delete
* ldap_dn2ufn
* ldap_explode_dn
* ldap_first_attribute
* ldap_first_entry
* ldap_free_result
* ldap_get_attributes
* ldap_get_dn
* ldap_get_entries
* ldap_get_values
* ldap_get_values_len
* ldap_list
* ldap_modify
* ldap_next_attribute
* ldap_next_entry
* ldap_read
* ldap_search
* ldap_unbind
* ldap_err2str
* ldap_errno
* ldap_error
Manual: ldap_bind
View the source code for this pageSearch the site



Previous page
 ldap_mod_replace
ldap_close 
Next page


ldap_bind

ldap_bind -- Bind to LDAP directory

Description

int ldap_bind(int link_identifier, string [bind_rdn], string [bind_password]);

Binds to the LDAP directory with specified RDN and password. Returns true on success and false on error.

ldap_bind() does a bind operation on the directory. bind_rdn and bind_password are optional. If not specified, anonymous bind is attempted.


User Contributed Notes: ldap_bind


rcgraves@brandeis.edu
04-Aug-1999 10:54
Warning: "reference binds" with null passwords will return success. Make sure the password is non-null before trusting it for authentication. :-) This is the way the API is supposed to work. It's not a PHP bug.


john.lewis@waldenweb.com
14-Dec-1999 05:01
To get around the null password returns true on servers where anonymous access is allowed, try... // get a connection $ldap=ldap_connect($ldapServer); // check to see if we got one, if we did, proceed if($ldap) { if(!$passWord) { // generate a bogus password to pass if the user doesn't give us one // this gets around systems that are anonymous search enabled $passWord = crypt(microtime()); } then do your ldap_bind to test authentication....


randy@intelliweb.com.my
14-Apr-2000 02:00
i've came across this error "can't connect to ldap server, invalid credential" any ideas ?


 About Notes


Previous page
 ldap_mod_replace
ldap_close 
Next page



Site Statistics


Who's responsible for this?
Top of this page

Site
Hosting:



Located in
United States
Elements of this website are subject to copyright.
Questions about installing or using PHP should be directed to one of the mailing lists.
Only questions about the website should be directed to webmaster@php.net.