Dear Walker, After connecting to the LDAP using ldap_connect('localhost'); you should use ldap_bind like the code given below.
<?php $conn = ldap_connect("localhost") or die("Could not connect to server. Error is " . ldap_error($conn)); // bind to the LDAP server $r = ldap_bind($conn, $root_dn, $root_pw) or die("Could not bind to server. Error is " . ldap_error($conn)); $dn = "dc=softprosys,dc=com"; $filter = "cn=".$dname."*"; $sr=ldap_search($conn,$dn,$filter,$justthese); ?> Hope this should help. Regards Praveen -----------------------SOFTPRO DISCLAIMER------------------------------ Information contained in this E-MAIL and any attachments are confidential being proprietary to SOFTPRO SYSTEMS is 'privileged' and 'confidential'. If you are not an intended or authorised recipient of this E-MAIL or have received it in error, You are notified that any use, copyiny or dissemination of the information contained in this E-MAIL in any manner whatsoever is strictly prohibited. Please delete it immediately and notify the sender by E-MAIL. In such a case reading, reproducing, printing or further dissemination of this E-MAIL is strictly prohibited and may be unlawful. SOFTPRO SYSYTEMS does not REPRESENT or WARRANT that an attachment hereto is free from computer viruses or other defects. The opinions expressed in this E-MAIL and any ATTACHEMENTS may be those of the author and are not necessarily those of SOFTPRO SYSTEMS. ------------------------------------------------------------------------ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php