The options set ldap to protocol version 3, which is needed for active directory and alike on server 2k3 and alike and enabled debugging on the ldap connection. If I add it before, I get Fatal error: Call to undefined function ldap_ set_ option( ) in C: \ wamp\ www\ example. I am coding in CakePHP. I am getting an error message - " Fatal error: Call to undefined function ldap_ connect( ) ". I am using Ubuntu and PHP version is PHP 5. I have already installed ldap using this command-. Could not connect to LDAP host $ host\ n" ; }. I get this error : Fatal error: Call to undefined function ldap_ connect( ). I don' t know where to start checking because I guess all conditions are achieved for my WAMP to take into consideration Ldap. You don' t say what platform/ stack you' re running PHP on. Depending on the distribution there may be multiple php. One way to find out is to add the following script: