dcparham Posted July 2, 2009 Share Posted July 2, 2009 [if "flyhoney" is around, thx for previous help! thread is missing now, do not know why] errormsg: "Can't contact LDAP server" >using Ubuntu 8.04, PHP5, LDAP installed ldap section in phpinfo: ldap LDAP Support enabled RCS Version $Id: ldap.c,v 1.161.2.3.2.11 2007/07/17 09:09:42 jani Exp $ Total Links 0/unlimited API Version 3001 Vendor Name OpenLDAP Vendor Version 20409 SASL Support Enabled php code: <?php error_reporting(E_ALL); // place these two lines at the top of ini_set('display_errors', 1); // the script you are debugging phpinfo(); $ldapHost = "ldap://ip of server goes here, and works - connects fine, and authenticates with below id and password/just does not "contact LDAP server""; $ldapPort = "363"; $ldapUser = "ID"; $ldapPswd = "PASSWORD"; $ldapLink = ldap_connect($ldapHost) or die("Can't establish LDAP connection"); ldap_bind($ldapLink, $ldapUser, $ldapPswd) or die("Can't bind to the server"); //$results = ldap_search($ldapLink, $dn, "givenName=Abby"); $dn = "CN=Abby Normal,DC=anormal"; [line 22] $results = ldap_search($ldapLink, $dn, "givenName=Abby"); var_dump($results); ?> [output] Warning: ldap_search() [function.ldap-search]: Search: Can't contact LDAP server in /var/www/ldapTest1.php on line 22 bool(false) [/output] is the port wrong? is the $dn correct? otherwise, what might be wrong? any help is appreciated! Link to comment https://forums.phpfreaks.com/topic/164517-cant-contact-ldap-server/ Share on other sites More sharing options...
Technocrat Posted July 2, 2009 Share Posted July 2, 2009 Try port 389 Link to comment https://forums.phpfreaks.com/topic/164517-cant-contact-ldap-server/#findComment-867883 Share on other sites More sharing options...
iPixel Posted July 2, 2009 Share Posted July 2, 2009 Connecting to LDAP is the biggest pain in the @$$ you, at least it was for me. Hence it is why i completely recommend implementing and using... http://adldap.sourceforge.net/ Enjoy and GL! Link to comment https://forums.phpfreaks.com/topic/164517-cant-contact-ldap-server/#findComment-867886 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.