Problem loading LDAP library - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Problem loading LDAP library (/showthread.php?tid=33233) |
Problem loading LDAP library - El Forum - 08-19-2010 [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? Problem loading LDAP library - El Forum - 08-19-2010 [eluser]Ray Julich[/eluser] Should there be a function in the LDAP library called ldap_connet() or is this a built in function? Problem loading LDAP library - El Forum - 08-19-2010 [eluser]danmontgomery[/eluser] http://php.net/manual/en/function.ldap-connect.php You need the php_ldap extension enabled. Problem loading LDAP library - El Forum - 08-19-2010 [eluser]Ray Julich[/eluser] Thank you so much. That was all it was. Problem loading LDAP library - El Forum - 03-16-2011 [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. |