'CodeIgniter 3 Auth_Ldap Library Couldn't find groups: Operations error

I'm trying to authenticate users using an Auth_Ldap library, in CodeIgniter 3, but I'm getting the following errors:

A PHP Error was encountered Severity: Warning

Message: ldap_search(): Search: Operations error

A PHP Error was encountered Severity: Warning

Message: ldap_get_entries() expects parameter 2 to be resource, boolean given

The second one it's because ldap_get_entries() expects the second parameter, and this is the $search, who depends on ldap_search.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source