Issue Details (XML | Word | Printable)

Key: MDL-12143
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Eloy Lafuente (stronk7)
Reporter: Pegase MD
Votes: 2
Watchers: 5
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Installation Problem with UTF-8

Created: 13/Nov/07 09:22 AM   Updated: 13/Jun/08 02:50 PM
Return to search
Component/s: Installation
Affects Version/s: 1.9
Fix Version/s: None

File Attachments: None
Image Attachments:

1. Moodle_19_Environment.png
(101 kB)

2. Picture 2.jpg
(47 kB)

3. Picture 3.jpg
(249 kB)
Environment: Hostmonster Shared Hosting

Database: MySQL
URL: http://www.africastrategy.com/e-kocc/install.php
Participants: Ben Nasse, Eloy Lafuente (stronk7), James Williamson, Kent Bergstrom, Pegase MD and Stefan Lessmann
Security Level: None
Affected Branches: MOODLE_19_STABLE


 Description  « Hide
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.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Ben Nasse added a comment - 22/Nov/07 01:49 AM
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.

Ben Nasse added a comment - 22/Nov/07 01:52 AM
This is my 1.7 env

Ben Nasse added a comment - 22/Nov/07 01:54 AM
Here is the error that I get

Ben Nasse added a comment - 11/Jan/08 02:21 AM
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.

Kent Bergstrom added a comment - 26/Mar/08 12:45 AM
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.

Eloy Lafuente (stronk7) added a comment - 28/Mar/08 09:16 AM
Hi Kent,

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

TIA and ciao


Eloy Lafuente (stronk7) added a comment - 13/Apr/08 10:13 AM
Any comment here? Going to close this as not reproducible in a couple of days...

TIA and ciao


Kent Bergstrom added a comment - 13/Apr/08 09:48 PM
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

Eloy Lafuente (stronk7) added a comment - 16/Apr/08 08:29 AM
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!


James Williamson added a comment - 19/May/08 02:18 AM
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


James Williamson added a comment - 19/May/08 02:19 AM
Attached screenshot: Moodle 1.9 environment check is okay.

James Williamson added a comment - 19/May/08 02:23 AM
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


James Williamson added a comment - 19/May/08 02:27 AM
Hi:

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

Jim


Ben Nasse added a comment - 29/May/08 01:01 PM
I hate to beat a dead horse but what does your my.cnf file look like?

James Williamson added a comment - 30/May/08 03:07 AM
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


James Williamson added a comment - 30/May/08 07:03 AM
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


Stefan Lessmann added a comment - 13/Jun/08 02:50 PM
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