Re: dmlreadexception error with moodle 2.0 RC1 fresh install
If so what results did you get?
Jon
Re: dmlreadexception error with moodle 2.0 RC1 fresh install
Re: dmlreadexception error with moodle 2.0 RC1 fresh install
On a Moodle 2.0 install with only a couple courses we are suddenly getting error/dmlreadexception when we try to get to the opening Moodle page in any browser.
We're running Ubuntu and MySQL.
Clearly we can't turn Debuggin on as we never get to the login page.
The site worked one day and didn't work the next, with no known changes to the server in between.
Suggestions?
Thanks!
Jo
Re: dmlreadexception error with moodle 2.0 RC1 fresh install
Thanks Tim!
This helped a lot. I was able to solve my problem.
Jo
Re: dmlreadexception error with moodle 2.0 RC1 fresh install
How?
Re: dmlreadexception error with moodle 2.0 RC1 fresh install
That page is 6 years old and the user is no longer registered!
Re: dmlreadexception error with moodle 2.0 RC1 fresh install
I managed to turn debugging on in config.php
Specifically:
//=========================================================================
// 7. SETTINGS FOR DEVELOPMENT SERVERS - not intended for production use!!!
//=========================================================================
//
// Force a debugging mode regardless the settings in the site administration
@error_reporting(E_ALL | E_STRICT); // NOT FOR PRODUCTION SERVERS!
@ini_set('display_errors', '1'); // NOT FOR PRODUCTION SERVERS!
$CFG->debug = (E_ALL | E_STRICT); // === DEBUG_DEVELOPER - NOT FOR PRODUCTION SERVERS!
$CFG->debugdisplay = 1; // NOT FOR PRODUCTION SERVERS!
This revealed the error was by a bug in the Moodle code. MySQL (5.7) updated a variable name which broke the reference in Moodle.
Check out
https://tracker.moodle.org/browse/MDL-50633
You can fix the problem temporarily by updating core to use the correct variable name.
lib/dml/mysqli_native_moodle_database.php
`
change this
```
// get the default database engine
$sql = "SELECT @@storage_engine";
$this->query_start($sql, NULL, SQL_QUERY_AUX);
$result = $this->mysqli->query($sql);
$this->query_end($result);
if ($rec = $result->fetch_assoc()) {
$engine = $rec['@@storage_engine'];
}
$result->close();
```
to this
```
// get the default database engine
$sql = "SELECT @@default_storage_engine";
$this->query_start($sql, NULL, SQL_QUERY_AUX);
$result = $this->mysqli->query($sql);
$this->query_end($result);
if ($rec = $result->fetch_assoc()) {
$engine = $rec['@@default_storage_engine'];
}
$result->close();
Hope that helps. I have wasted enough time on this...