First of all, I've done my research and the solutions I've found haven't worked for me.
I've just upgraded a Moodle 3.2 site to Moodle 3.6.1. The upgrade process has seemingly gone fine, however I can't log into the site, I get the following error:
Exception - Call to undefined function mysql_connect()
The old site used to run on PHP 5.6, but I've upgraded the server's PHP 7.2 and installed all the required modules. I'm aware that on PHP 7 mysql has been deprecated, and following indications found online I've changed the dbtype to mysqli before the upgrade, as explained here: https://moodle.org/mod/forum/discuss.php?d=370774. I've made this change both in the site's admin area for the external enrolment plugin (before the Moodle upgrade) and in the database (after the upgrade).
After doing the Moodle upgrade, the site loads fine, until I try to login, when I get the aforementioned error. The site uses external database authentication for students, but the admin user is in the same database as Moodle (not in the external one).
Any ideas of how I can fix this? Looks like the error comes from Moodle insisting in using mysql instead of mysqli, but I don't know what else to change to prevent that... I've also purged caches and restarted db services to no avail.
This is the debug output when trying to login as an admin:
Debug info:
Error code: generalexceptionmessage
Stack trace:
line 461 of /lib/adodb/drivers/adodb-mysql.inc.php: Error thrown
line 492 of /lib/adodb/drivers/adodb-mysql.inc.php: call to ADODB_mysql->_connect()
line 667 of /lib/adodb/adodb.inc.php: call to ADODB_mysql->_nconnect()
line 867 of /enrol/database/lib.php: call to ADOConnection->Connect()
line 144 of /enrol/database/lib.php: call to enrol_database_plugin->db_init()
line 245 of /lib/enrollib.php: call to enrol_database_plugin->sync_user_enrolments()
line 486 of /lib/classes/session/manager.php: call to enrol_check_plugins()
line 4528 of /lib/moodlelib.php: call to core\session\manager::login_user()
line 199 of /login/index.php: call to complete_user_login()
EDIT - Clarification of what I've tried already:1. $CFG->dbtype = 'mysqli';
in config.php
2. In DB table mdl_config_plugins: enrol_database->dbtype set to mysqli
3. In Site Admin -> Plugins -> Authentication -> External database -> DB Type set to mysqli