Hi all
This is about an "archive" server. The data has been moved to a new server, this one was idling for "just in case". It was configured for LDAP authentication and enrollment. I should have deactivated the LDAP. Over the years a newer php_ldap module has broken the Moodle-LDAP communication and now it throws "Fatal error: Call to undefined function ldap_connect() in /var/www/html/moodle/lib/ldaplib.php on line 183" even if the (manual) admin tries to login.
The question is, what is the proper way to deactivate LDAP? I have full shell and database access. The old trick of deleting the line (3,'auth','ldap') in mdl_config didn't make a difference. Still the same error.
Deactivate ldap: no web access, full shell and DB access
by Visvanath Ratnaweera -
Number of replies: 2
In reply to Visvanath Ratnaweera
Re: Deactivate ldap: no web access, full shell and DB access
by Dan Marsden -
It's cached. Try clearing the cache or hard code in config.php:
$CFG->auth = 'manual';
In reply to Dan Marsden
Re: Deactivate ldap: no web access, full shell and DB access [RESOLVED]
by Visvanath Ratnaweera -
Dan,
Clearing the cache, ./admin/cli/purge_caches.php, didn't help. Neither the $CFG->auth = 'manual'; trick. Although the $CFG was set this way, the execution diverted to ./lib/ldaplib.php whatever I did elsewhere in the source. I read something about a broken php5X-ldap module in the Debian repos and purged all php-ldaps and reinstalled php5.6-ldap. The problem solved!
I think there was a mess up in the php-ldap modules, there were more than one(!), the one which was active didn't like the syntax of the ldap_connect command in this Moodle. I should have mentioned the version, it is 2.7.20.
Anyway, the problem solved. Thanks to your initial hint!
Clearing the cache, ./admin/cli/purge_caches.php, didn't help. Neither the $CFG->auth = 'manual'; trick. Although the $CFG was set this way, the execution diverted to ./lib/ldaplib.php whatever I did elsewhere in the source. I read something about a broken php5X-ldap module in the Debian repos and purged all php-ldaps and reinstalled php5.6-ldap. The problem solved!
I think there was a mess up in the php-ldap modules, there were more than one(!), the one which was active didn't like the syntax of the ldap_connect command in this Moodle. I should have mentioned the version, it is 2.7.20.
Anyway, the problem solved. Thanks to your initial hint!