Upgrade to 1.8.0 fails - can't connect to mysql
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
High
|
Robert Lyon | ||
1.8 |
Fix Released
|
High
|
Unassigned | ||
1.9 |
Fix Released
|
High
|
Robert Lyon |
Bug Description
After upgrading to 1.8.0 I couldn't open the admin/upgrade.php page. The error displayed stated that mahara could not connect to the mysql db. Running on Ubuntu LTS Server.
After some poking around I managed to get things running by altering the code in init.php.
The new code read:
// Transform $CFG->dbtype into the name of the ADODB driver we will use
if (is_postgres()) {
}
else if (is_mysql()) {
// If they have mysqli, use it. Otherwise, fall back to the older "mysql" extension.
if (extension_
}
else {
}
}
I replace this with:
// Transform $CFG->dbtype into the name of the ADODB driver we will use
if (is_postgres()) {
}
else if (is_mysql()) {
// If they have mysqli, use it. Otherwise, fall back to the older "mysql" extension.
//if (extension_
// $CFG->dbtype = 'mysqli';
//}
//else {
// $CFG->dbtype = 'mysql';
//}
}
I also receive the error:
The mysqli PHP extension is not installed on your server. Thus, Mahara is falling back to the deprecated original mysql PHP extension. We recommend installing mysqli. Trouble is that fallback doesn't seem to be working at all.
Fact is mysqli is included with php5-mysql in ubuntu. Mahara doesn't seem to see that. Maybe the code that is suppose to detect that in init.php blocks connection to the server, stopping mahara from running at all.
This does not happen in 1.7.x.
description: | updated |
Changed in mahara: | |
milestone: | none → 1.8.1 |
Changed in mahara: | |
status: | Confirmed → Fix Committed |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
Hi henrythemouse,
Yes I've just run into the same problem - there does seem to be an issue upgrading a site that was using a mysql connection to 1.8 that wants to use mysqli
I'll take a look into this
Cheers
Robert