0

I'm a Moodle administrator that I recently changed the site's operating system from Centos to Ubuntu and also upgraded the version of Moodle from 3.9 to 3.11.2. Everything was going well until I wanted to change the email address of my profile (or that of other users), that I got an "error reading from database" error message. (Error message) Therefore, the Moodle does not allow changing the email address.

I am asking for guidance and help from users who have experience in solving this problem.

Thanks a lot.

  • Are you able to peruse the logs? No chance to have any idea of what's going on without looking into db/web server/php logs. – Nelloverflow Sep 17 '21 at 10:38
  • I saw the php error_log file, but the entry related to the mentioned error is not inserted in it. – Ali KargarFard Sep 17 '21 at 11:52
  • Have you enabled debugging in Moodle's config.php file ? @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); // NOT FOR PRODUCTION SERVERS! $CFG->debugdisplay = 1; https://docs.moodle.org/311/en/Debugging#In_config.php – Ludo Sep 25 '21 at 15:35
  • The problem was solved by changing the database collation from 'utf8mb4_general_ci' to 'utf8_general_ci' in config.php file. – Ali KargarFard Oct 06 '21 at 07:25

1 Answers1

1

In my case the dbcollation was utf8mb4_unicode_ci, so I simply changed it to utf8_unicode_ci

Kept getting the error when trying to add a New User or change the email address of a User, like Ali. Not sure if Softaculous update from 10.5 to 11 was to blame, since hadn't tried to add/update any users from 3.11 through to our latest 3.11.4 incremental updates.

baltekg
  • 985
  • 9
  • 31
Jeff
  • 11
  • 1