Moodle

Installation Problem with UTF-8

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.9
  • Fix Version/s: None
  • Component/s: Installation
  • Labels:
    None
  • Environment:
    Hostmonster Shared Hosting

Description

ERROR MESSAGE:

"It is required that you store all your data in Unicode format (UTF-8). New installations must be performed into databases that have their default character set as Unicode. If you are upgrading, you should perform the UTF-8 migration process (see the Admin page)."

However, I am almost certain that the database is in UTF-8.

Thanks.

Activity

Hide
Ben Nasse added a comment -

Have this same issue when trying to set up a test server with database from a 1.7 production site. I attached a screenshot of my 1.7 environment and another of the error I get on the test server.

Show
Ben Nasse added a comment - Have this same issue when trying to set up a test server with database from a 1.7 production site. I attached a screenshot of my 1.7 environment and another of the error I get on the test server.
Hide
Ben Nasse added a comment -

This is my 1.7 env

Show
Ben Nasse added a comment - This is my 1.7 env
Hide
Ben Nasse added a comment -

Here is the error that I get

Show
Ben Nasse added a comment - Here is the error that I get
Hide
Ben Nasse added a comment -

I think I fixed this for my installation. It had to do with my.cnf in ubuntu Gutsy Gibbon not specifying a language type and then defaulting to Latin.
https://bugs.launchpad.net/ubuntu/+source/mysql-dfsg-5.0/+bug/34181
talks about it a little bit.

Show
Ben Nasse added a comment - I think I fixed this for my installation. It had to do with my.cnf in ubuntu Gutsy Gibbon not specifying a language type and then defaulting to Latin. https://bugs.launchpad.net/ubuntu/+source/mysql-dfsg-5.0/+bug/34181 talks about it a little bit.
Hide
Kent Bergstrom added a comment -

I'm still having this same issue and the server folks have tracked according to them no problems at their end. They say that everything is UTF-8 by default in my settings and are not getting any reports that it is anything but UTF-8. I was told by them to find out what it is in moodle that would make this error. It's happening on two fresh installs on two different databases that were created from scratch.

Show
Kent Bergstrom added a comment - I'm still having this same issue and the server folks have tracked according to them no problems at their end. They say that everything is UTF-8 by default in my settings and are not getting any reports that it is anything but UTF-8. I was told by them to find out what it is in moodle that would make this error. It's happening on two fresh installs on two different databases that were created from scratch.
Hide
Eloy Lafuente (stronk7) added a comment -

Hi Kent,

and how have you created those databases? From phpMyAdmin, command line? Which options/sql have you selected or typed?

TIA and ciao

Show
Eloy Lafuente (stronk7) added a comment - Hi Kent, and how have you created those databases? From phpMyAdmin, command line? Which options/sql have you selected or typed? TIA and ciao
Hide
Eloy Lafuente (stronk7) added a comment -

Any comment here? Going to close this as not reproducible in a couple of days...

TIA and ciao

Show
Eloy Lafuente (stronk7) added a comment - Any comment here? Going to close this as not reproducible in a couple of days... TIA and ciao
Hide
Kent Bergstrom added a comment -

Every effort I've made so far has come up with nothing but the same error.
I've created the databases from the servers auto mysql setups and always commanded the utf-8 as the only database setup.
They say it is moodle, moodle tells me it can't be installed because of it. Very frustrating

Show
Kent Bergstrom added a comment - Every effort I've made so far has come up with nothing but the same error. I've created the databases from the servers auto mysql setups and always commanded the utf-8 as the only database setup. They say it is moodle, moodle tells me it can't be installed because of it. Very frustrating
Hide
Eloy Lafuente (stronk7) added a comment -

Hi Kent,

can you execute this in your server:

SHOW VARIABLES LIKE 'character_set%';

SHOW LOCAL VARIABLES LIKE 'character_set%';

and post results here. Those are the checks performed by Moodle, just seeing what are them returning in your server. TIA!

Show
Eloy Lafuente (stronk7) added a comment - Hi Kent, can you execute this in your server: SHOW VARIABLES LIKE 'character_set%'; SHOW LOCAL VARIABLES LIKE 'character_set%'; and post results here. Those are the checks performed by Moodle, just seeing what are them returning in your server. TIA!
Hide
James Williamson added a comment -

Hi,

I'm having the same problem. I am trying to upgrade from v 1.9 to v 1.9.1 and receiving this message: "Sorry, but your database is not already in Unicode, and this version of Moodle is not able to migrate your database to Unicode. Please upgrade to Moodle 1.7.x first and perform the Unicode migration from the Admin page. After that is done you should be able to migrate to Moodle 2007101512"

Background: Very experienced Moodler (using since 1.3); never had an upgrade problem until now.

Environment: Ubuntu 8.04; MySQL 5.0.51; PHP 5.2.4

If I revert to v1.9, the environment check is perfect (see attached).

In answer to Eloy's server questions, both queries return the following results:

SHOW LOCAL VARIABLES LIKE 'character_set%';
Variable_name Value
character_set_client utf8
character_set_connection utf8
character_set_database utf8
character_set_filesystem binary
character_set_results utf8
character_set_server latin1
character_set_system utf8
character_sets_dir /usr/share/mysql/charsets/

Anything more to check?

Thanks,

Jim

Show
James Williamson added a comment - Hi, I'm having the same problem. I am trying to upgrade from v 1.9 to v 1.9.1 and receiving this message: "Sorry, but your database is not already in Unicode, and this version of Moodle is not able to migrate your database to Unicode. Please upgrade to Moodle 1.7.x first and perform the Unicode migration from the Admin page. After that is done you should be able to migrate to Moodle 2007101512" Background: Very experienced Moodler (using since 1.3); never had an upgrade problem until now. Environment: Ubuntu 8.04; MySQL 5.0.51; PHP 5.2.4 If I revert to v1.9, the environment check is perfect (see attached). In answer to Eloy's server questions, both queries return the following results: SHOW LOCAL VARIABLES LIKE 'character_set%'; Variable_name Value character_set_client utf8 character_set_connection utf8 character_set_database utf8 character_set_filesystem binary character_set_results utf8 character_set_server latin1 character_set_system utf8 character_sets_dir /usr/share/mysql/charsets/ Anything more to check? Thanks, Jim
Hide
James Williamson added a comment -

Attached screenshot: Moodle 1.9 environment check is okay.

Show
James Williamson added a comment - Attached screenshot: Moodle 1.9 environment check is okay.
Hide
James Williamson added a comment -

Hi,

I intended to add this info:

When I initially received this error I did a db table check. All my Moodle tables were utf8_general_ci, but those tables that were added with phpMyAdmin were utf8_bin.

I altered the mdl_pma_* tables to utf8_general_ci and restarted both the DB server and the Ubuntu server. No good.

I then dropped all the mdl_pma_* tables, but to no avail: the upgrade to v 1.9.1 still results in the Unicode error.

Thanks,

Jim

Show
James Williamson added a comment - Hi, I intended to add this info: When I initially received this error I did a db table check. All my Moodle tables were utf8_general_ci, but those tables that were added with phpMyAdmin were utf8_bin. I altered the mdl_pma_* tables to utf8_general_ci and restarted both the DB server and the Ubuntu server. No good. I then dropped all the mdl_pma_* tables, but to no avail: the upgrade to v 1.9.1 still results in the Unicode error. Thanks, Jim
Hide
James Williamson added a comment -

Hi:

One more detail to add: I removed phpMyAdmin, so that's not the problem.

Jim

Show
James Williamson added a comment - Hi: One more detail to add: I removed phpMyAdmin, so that's not the problem. Jim
Hide
Ben Nasse added a comment -

I hate to beat a dead horse but what does your my.cnf file look like?

Show
Ben Nasse added a comment - I hate to beat a dead horse but what does your my.cnf file look like?
Hide
James Williamson added a comment -

Hi Ben,

I used the settings you recommended via the link above, adding them to the /etc/mysql/my.cnf file but with the same no-go results. A follow-up question:

Is there a command to ask MySQL which settings file it is drawing from? Even though I've got the settings correct in the my.cnf file (and I've restarted both Apache and MySQL), when I run "mysqladmin variables" I see the following mix of utf8 and latin1 settings, which may hint to the problem:

------------------------------------------------------------+

Variable_name Value

------------------------------------------------------------+

character_set_client latin1
character_set_connection latin1
character_set_database latin1
character_set_filesystem binary
character_set_results latin1
character_set_server latin1
character_set_system utf8
character_sets_dir /usr/share/mysql/charsets/
collation_connection latin1_swedish_ci
collation_database latin1_swedish_ci
collation_server latin1_swedish_ci
------------------------------------------------------------+

Any other hints would be appreciated. As I noted, I've been running Moodle since v1.3.x and have never had a problem with upgrading until now. (And why would it work from all dot releases > v1.7 to v1.9 and now get stuck on v1.9.1? It's a mystery.) Does anyone know if another application using the same MySQL server (but obviously not the same tables) could cause a problem. I installed WordPress on the same box, but can't remember the chronology so don't know if that could be a cause.

Thanks, Jim

Show
James Williamson added a comment - Hi Ben, I used the settings you recommended via the link above, adding them to the /etc/mysql/my.cnf file but with the same no-go results. A follow-up question: Is there a command to ask MySQL which settings file it is drawing from? Even though I've got the settings correct in the my.cnf file (and I've restarted both Apache and MySQL), when I run "mysqladmin variables" I see the following mix of utf8 and latin1 settings, which may hint to the problem: ------------------------------------------------------------+
Variable_name Value
------------------------------------------------------------+
character_set_client latin1
character_set_connection latin1
character_set_database latin1
character_set_filesystem binary
character_set_results latin1
character_set_server latin1
character_set_system utf8
character_sets_dir /usr/share/mysql/charsets/
collation_connection latin1_swedish_ci
collation_database latin1_swedish_ci
collation_server latin1_swedish_ci ------------------------------------------------------------+
Any other hints would be appreciated. As I noted, I've been running Moodle since v1.3.x and have never had a problem with upgrading until now. (And why would it work from all dot releases > v1.7 to v1.9 and now get stuck on v1.9.1? It's a mystery.) Does anyone know if another application using the same MySQL server (but obviously not the same tables) could cause a problem. I installed WordPress on the same box, but can't remember the chronology so don't know if that could be a cause. Thanks, Jim
Hide
James Williamson added a comment -

Hi,

I've got a resolution. A far more experienced programmer helped navigate through the Moodle codebase to discover that a value was missing from my mdl_config table. By inserting the value, we were able to proceed with the upgrade:

insert into mdl_config set `name`="unicodedb", value=1;

The mystery remains, though, as to why this value disappeared or why I was able to consistently upgrade thus far without it. But it's fixed now.

Jim

Show
James Williamson added a comment - Hi, I've got a resolution. A far more experienced programmer helped navigate through the Moodle codebase to discover that a value was missing from my mdl_config table. By inserting the value, we were able to proceed with the upgrade: insert into mdl_config set `name`="unicodedb", value=1; The mystery remains, though, as to why this value disappeared or why I was able to consistently upgrade thus far without it. But it's fixed now. Jim
Hide
Stefan Lessmann added a comment -

Hi James,

I had the same Problem as you, after inserting the value, the update from v1.8 to v1.91 works fine. Thanks for your hint!

Stefan

Show
Stefan Lessmann added a comment - Hi James, I had the same Problem as you, after inserting the value, the update from v1.8 to v1.91 works fine. Thanks for your hint! Stefan
Hide
Carl Bogardus added a comment -

I am having the same problem, tried the fix above, (even though I am not that familiar with MYSQL). Error showed up upon upgrade to 1.9.9+ from 1.9.8. I had migrated to UTF-8 unicode long ago.

Windows NT TUB 5.2 build 3790
PHP Version 5.2.6
MYSQL 5.0.45
Moodle 1.9.9+ (yes, it seems to be running ok despite the error message)

Show
Carl Bogardus added a comment - I am having the same problem, tried the fix above, (even though I am not that familiar with MYSQL). Error showed up upon upgrade to 1.9.9+ from 1.9.8. I had migrated to UTF-8 unicode long ago. Windows NT TUB 5.2 build 3790 PHP Version 5.2.6 MYSQL 5.0.45 Moodle 1.9.9+ (yes, it seems to be running ok despite the error message)
Hide
Igor Kondrasovas added a comment -

I am working in a migration from version 2.0 to 2.1 and I still get the same message. I tried the suggested sql statement, but the same erros appears...

Don't know what else to do !!!

Igor.

Show
Igor Kondrasovas added a comment - I am working in a migration from version 2.0 to 2.1 and I still get the same message. I tried the suggested sql statement, but the same erros appears... Don't know what else to do !!! Igor.

Dates

  • Created:
    Updated: