authentication - PHP LDAP connection with AD LDS -


I'm trying to write some PHP to ask an AD LDS / LDAP (2012 R2) example and I do not I can get the thing to connect I currently have it installed as an unencrypted connection (Prod will be SSL / TLS).

Current Troubleshooting:

  • I can connect and perform with my LDAP example via LDAPark.
  • I can connect via LDP to my windows box
  • I can ping the LDAP server and telnet from my nix box to port.
  • Efforts have been made
  • Tryed URI (LDAP: // Lidsource: 50001 or port is your own) < P> I have rewritten the code in a million times thinking it was a syntax error or something was not passing properly $ Ldapconn is returning "Resource ID # 2", which appears to be correct per PHP manual. I am stumped at this point, can any additional debugging be operational?

    Here is an error that brings it back:

    WARNING: ldap_bind (): Unable to bind to server: can not / usr / share / Contact nginx / html / logintest3.php on line 20

    Here is the relevant code:

      & lt; php // all debugging ini_set ('display_errors', 'on'); Ldap_set_option (NULL, LDAP_OPT_DEBUG_LEVEL, 7); $ Ldapuser = "ldapbind"; $ Ldappassword = "ldapbinder"; $ Ldapserver = "ldapserver"; $ Ldapport = 50001; // connect to ldap server $ ldapconn = ldap_connect ($ ldapserver, $ ldapport) or die ("could not connect to $ ldapserver"); // Check if ldap_connect returned a resource value ($ ldapconn) "$ ldapconn" echo; // attempt to force $ ldapbind = ldap_bind ($ ldapconn, $ ldapuser, $ ldappassword); "Ldap connection debug" echo: ".ldap_error" ($ ldapconn) "\ N";? & Gt;    

    Try

      ldap_set_option ($ ldap, LDAP_OPT_REFERRALS, 0); Ldap_set_option ($ ldap, LDAP_OPT_PROTOCOL_VERSION, 3);    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -