Hi there, we have an instance of Moodle 3.2.2, we use the synchronization script and we are having some problems with the courses that have a lot of users (almost 2000) to sync.
- We are getting this message :
PHP Warning: ldap_read(): Search: Can't contact LDAP server in /.../moodle/enrol/ldap/lib.php on line 917
PHP Warning: ldap_first_entry() expects parameter 2 to be resource, boolean given in /.../moodle/enrol/ldap/lib.php on line 918
PHP Warning: ldap_get_values() expects parameter 2 to be resource, null given in /.../moodle/enrol/ldap/lib.php on line 919
PHP Warning: in_array() expects parameter 2 to be array, null given in /.../moodle/enrol/ldap/lib.php on line 921
- Our workaround (with which we are not really happy) is to reopen the connection for each course processed enabling it to finish (there is no time out and all the users are synced)
Trying to understand the code :
- when we call the function ldap_paged_results_supported at sync_enrolments in enrol/ldap/lib.php line 331, there is no second parameter as in the call of the same function in auth/ldap/auth.php
- so the value of $ldapconnection variable is null (default value) and the function ldap_paged_results_supported will always return false at the second condition in /lib/ldaplib.php
If someone have any idea of this problem please any comment will be very appreciated. I just opened a new issue for this.
Thanks in advance,