Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
2.8.8, 2.9.2, 3.0, 3.5.4
-
None
-
MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE, MOODLE_35_STABLE
Description
At the moment, the MySQL extension is deprecated and will be removed on PHP7.
While testing an external db connection with MySQL, I've got the warnings:
|
PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/moodle/moodles/stable_master/moodle/lib/adodb/drivers/adodb-mysql.inc.php on line 458
|
We should consider, either migrate auth_db and enrol_db instances to mysqli (which has few differences from mysql) or deprecate the use of the adodb mysql driver, by giving a debugging message when it is selected (or some other solution).
This now gives the following error in php7:
Exception - Call to undefined function mysql_connect()
|
|
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 652 of /lib/adodb/adodb.inc.php: call to ADODB_mysql->_nconnect()
|
line 165 of /auth/db/auth.php: call to ADOConnection->Connect()
|
line 111 of /auth/db/auth.php: call to auth_plugin_db->db_init()
|
line 4180 of /lib/moodlelib.php: call to auth_plugin_db->user_login()
|
line 144 of /login/index.php: call to authenticate_user_login()
|
Attachments
Issue Links
- duplicates
-
MDL-73664 Upgrade ADODB to latest version (5.21.4)
-
- Closed
-
- is duplicated by
-
MDL-52695 External database authentication - mysql_connect deprecated in PHP7
-
- Closed
-
- will be (partly) resolved by
-
MDL-71011 Update ADOdb to v5.21.0 and make it PHP 8.0 compliant (final & private ban)
-
- Closed
-
- will help resolve
-
MDL-56933 Change external DB default driver to mysqli
-
- Closed
-