dmlreadexception error with moodle 2.0 RC1 fresh install

dmlreadexception error with moodle 2.0 RC1 fresh install

by Mathieu ADOUTTE -
Number of replies: 8
Hi,
I just tried to do a fresh install of moodle 2.0 RC1. I get this error :
http://www.pishnet.fr/admin/index.php?agreelicense=1&confirmrelease=1&lang=en

Any clue ?
Average of ratings: -
In reply to Mathieu ADOUTTE

Re: dmlreadexception error with moodle 2.0 RC1 fresh install

by Jon Witts -
Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Have you tried following the guidelines on this page? error/moodle/dmlreadexception which your error links to?

If so what results did you get?

Jon
In reply to Jon Witts

Re: dmlreadexception error with moodle 2.0 RC1 fresh install

by Mathieu ADOUTTE -
The guidelines advise to enable Debugging mode. Since I get this error at the very beginning of the installation process (no tables have been created, etc), the site is not yet functionnal and I have no way to enable debugging.
In reply to Jon Witts

Re: dmlreadexception error with moodle 2.0 RC1 fresh install

by Joanne Cannon -

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

In reply to Joanne Cannon

Re: dmlreadexception error with moodle 2.0 RC1 fresh install

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

You can turn on Debugging even if you can't get to the admin screens. That docs page explains how.

In reply to Tim Hunt

Re: dmlreadexception error with moodle 2.0 RC1 fresh install

by Joanne Cannon -

Thanks Tim!

This helped a lot.  I was able to solve my problem.

Jo

In reply to Joanne Cannon

Re: dmlreadexception error with moodle 2.0 RC1 fresh install

by Albert Ramsbottom -

How?

In reply to Albert Ramsbottom

Re: dmlreadexception error with moodle 2.0 RC1 fresh install

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

That page is 6 years old and the user is no longer registered!

In reply to Albert Ramsbottom

Re: dmlreadexception error with moodle 2.0 RC1 fresh install

by Ryan-Neal Mes -
For people who run in this @#($*&@#$ issue.


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...