Problem loading LDAP library |
[eluser]Ray Julich[/eluser]
I want to authenticate a username through active directory using a web page form, but I'm getting an error when loading the LDAP library into my application: Quote:Fatal error: Call to undefined function ldap_connect() The error occurs obviously when conntecting to the domain controller. The only thing I've changed in the LDAP library is the hostname of my domain controller: Code: var $_domain_controllers = array("my_dc"); I've printed out what the php file thinks is the domain controller and it is using the correct one, but the error is occurring at: Code: $this->_conn = ldap_connect($dc); Any ideas on what I could try to get this working?
[eluser]Ray Julich[/eluser]
Should there be a function in the LDAP library called ldap_connet() or is this a built in function?
[eluser]danmontgomery[/eluser]
http://php.net/manual/en/function.ldap-connect.php You need the php_ldap extension enabled.
[eluser]pegas[/eluser]
Hi, So my gues is that the error will occur if i don't have the server name setup, so the ldap_connect can actually connect to something ?! (I've enabled the ldap module on my apache waamp server and restarted it) My question is, how can I catch the error mentioned above, and display something else instead ? Here is my bogus try to do so (the code dose absolutelly nothing :-) ) Code: // in my controller Thanks for helping me with this. |
Welcome Guest, Not a member yet? Register Sign In |