Fatal error: Call to a member function fetch_assoc() on boolean in /virtual/site_name/moodle/lib/dml/mysqli_native_moodle_database.php on line 244

Fatal error: Call to a member function fetch_assoc() on boolean in /virtual/site_name/moodle/lib/dml/mysqli_native_moodle_database.php on line 244

by Ser Smertelny -
Number of replies: 2
Hello everyone.


I was trying to install moodle on web hosting. But after I accepting copyright notice i get such error:

Fatal error: Call to a member function fetch_assoc() on boolean in /virtual/site_name/moodle/lib/dml/mysqli_native_moodle_database.php on line 244

How can i fix this?

Average of ratings: -
In reply to Ser Smertelny

Re: Fatal error: Call to a member function fetch_assoc() on boolean in /virtual/site_name/moodle/lib/dml/mysqli_native_moodle_database.php on line 244

by Ken Task -
Picture of Particularly helpful Moodlers

Which web hosting? What version of Moodle?   Does hosting provider have the required versions of PHP and MySQL for the version you are installing?   Not all providers do things the same exact way.   So before anyone could begin to give more exacting answers, more info would be needed.

However, before providing that info, have you checked to see if your hosting provider has FAQ's/KB's etc for customers related to DB's and PHP drivers for DB's?  

In particular, due to the error line number:

does hosting provider have php supports for MySQL DB ... mysqli driver?

That particular line in the error reported is is:

            $collation = $rec['collation_name'];

which has to do with the collation setting for the DB - which is an unusual error.

Official MySQL docs for such:

http://dev.mysql.com/doc/refman/5.7/en/charset-database.html

That's for version 5.7 of MySQL.

Bottom line is ... contact hosting provider.   Yeah, I know they point to this community forum for support, but any provider should have DB's set up such they take whatever collation customers need.   In this case, it's the providers error and no one over here could really get to the bottom of this without command line and root access to the DB servers.    Don't think they'll grant anyone that on a shared host.

'spirit of sharing', Ken




Average of ratings: Useful (1)
In reply to Ken Task

Re: Fatal error: Call to a member function fetch_assoc() on boolean in /virtual/site_name/moodle/lib/dml/mysqli_native_moodle_database.php on line 244

by Ser Smertelny -

Sorry, I really forgot to provide that data. PHP and MySQL versions matchs requirements.

I thought, that it is provider's problem, but they was not responding at that time.

Anyway, Thank you for your answer.