note 99785 added to function.ldap-connect

From: Date: Mon, 06 Sep 2010 19:29:14 +0000
Subject: note 99785 added to function.ldap-connect
Groups: php.notes 
Request: Send a blank email to php-notes+get-172343@lists.php.net to get a copy of this message
I am getting this error whenever i try to bind with ldap server.i tried both ways using authentication and without authentication.Even i enabled ldap extension and copied dll files.but no results and only error. i am using wamp server on xp. Warning: ldap_bind() [function.ldap-bind]: Unable to bind to server: Can't contact LDAP server in C:\wamp\www\newldap\newldap.php on line 12 LDAP bind failed... following is my code. <?php // using ldap bind $ldaprdn = 'root'; // ldap rdn or dn $ldappass = ''; // associated password // connect to ldap server $ldapconn = ldap_connect("127.0.0.1") or die("Could not connect to LDAP server."); if ($ldapconn) { // binding to ldap server $ldapbind = ldap_bind($ldapconn, $ldaprdn, $ldappass); // verify binding if ($ldapbind) { echo "LDAP bind successful..."; } else { echo "LDAP bind failed..."; } } ?> ---- Server IP: 69.147.83.197 Probable Submitter: 59.164.37.23 ---- Manual Page -- http://www.php.net/manual/en/function.ldap-connect.php Edit -- https://master.php.net/note/edit/99785 Del: integrated -- https://master.php.net/note/delete/99785/integrated Del: useless -- https://master.php.net/note/delete/99785/useless Del: bad code -- https://master.php.net/note/delete/99785/bad+code Del: spam -- https://master.php.net/note/delete/99785/spam Del: non-english -- https://master.php.net/note/delete/99785/non-english Del: in docs -- https://master.php.net/note/delete/99785/in+docs Del: other reasons-- https://master.php.net/note/delete/99785 Reject -- https://master.php.net/note/reject/99785 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#172343) next »