When I install the moodle, Got the following. Could you please help me regarding the red part issue?
Thanks a lot.
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).
Installing the optional ICONV library is highly recommended in order to improve site performance, particularly if your site is supporting non-latin languages.
Create a database to store the Moodle tables. We'll call this "moodle", as there are none with that name alreadt in the above list, but change it if you need to.
mysql> CREATE DATABASE moodle; Query OK, 1 row affected (0.00 sec)
- Change the default character set and collation of the "moodle" database to UTF8. Leave this out if you are installing Moodle 1.5 or earlier):
mysql> ALTER DATABASE moodle DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; Query OK, 1 row affected (0.00 sec)
Yes, yersterday I just searched the forum, and found a similar solution.
I used the following:
ALTER DATABASE moodle DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
but seems still got the same issue after then. Please see my this thread:
I will try again, but just did not have any idea where the root cause is ...
I'm getting a similar error...
Checking your environment ...
We are checking if the various components of your system meet the system requirements
I've been having a heck of a time installing Moodle. Any thoughts on this error?
INSERT INTO `mdl_user` (`id`, `auth`, `confirmed`, `policyagreed`, `deleted`, `mnethostid`, `username`, `password`, `idnumber`, `firstname`, `lastname`, `email`, `emailstop`, `icq`, `skype`, `yahoo`, `aim`, `msn`, `phone1`, `phone2`, `institution`, `department`, `address`, `city`, `country`, `lang`, `theme`, `timezone`, `firstaccess`, `lastaccess`, `lastlogin`, `currentlogin`, `lastip`, `secret`, `picture`, `url`, `description`, `mailformat`, `maildigest`, `maildisplay`, `htmleditor`, `ajax`, `autosubscribe`, `trackforums`, `timemodified`, `trustbitmask`, `imagealt`, `screenreader`) VALUES
(14, 'db', 1, 0, 0, 1, 'smile371', '277103c266c4b31b42160009cbce34c0', '', 'user', 'smile371', 'firstname.lastname@example.org', 0, '', '', '', '', '', '', '', '', '', '', '', 'CN', 'en_utf8', '', '99', 0, 0, 0, 0, '', '', 0, '', ' ', 1, 0, 2, 1, 1, 1, 0, 0, 0, NULL, 0);
If I update the red 'db' to 'manual', then the problem is resolved. Can anyone tell me why? What is the exact meaning of 'db' and 'manual'? Thanks a lot.
For the meaning of the 'auth' field, see http://docs.moodle.org/en/Edit_user_accounts#Edit_user_data_fields_in_SQL_database
The value 'manual' means Moodle handles authentication of users internally using usernames and passwords maintained in the mdl_user table; see http://docs.moodle.org/en/Manual_accounts; I think 'db' means it uses an external database to authenticate users; see http://docs.moodle.org/en/External_database_authentication
But your posts are somewhat confusing. Your first post showed the Server Checks page, which you said you got when you installed Moodle. It indicated that the empty database you created before the installation was not Unicode. Then you said that you ran the ALTER DATABASE statement to fix that. That should have worked, if the database was still empty. But now you are talking about changing a field in a table, which means the database is not empty. You are leaving something out. What's the whole story?
The ALTER DATABASE statement only changes the default character set and collation of the database. Moodle 1.8 requires also that the default character set and collation of every table also be utf8, and that every column in every table have character set utf8.
Thanks a lot for your so kind help. Actually, previously I integrated with the phpbb forum, and used the external php user table as auth. But when I doing the upgrade, I just forgot this point!! A big mistake...
With your great help, now the system is smooth and I also understand the root cause. Thanks again!!
Sorry to bother while got another situation regarding the "Invalid login" problem. After the above done, all the users are OK now, except one user who got a upper-case username "GOOD_TOY", when the user use his upper-case username to login, he met the "Invalid login" error.
Then I manually updated the mdl_user table, make his username to lower-caser "good_toy", then it is OK for login in.
My question is: Is this scenario as designed? Or abnormal? moodle can not support upper-case username? How to resolve it?
Thanks a lot again.
Since you are using the phpBB external database for user authentication, I suggest you look into how phpBB treats uppercase usernames.
Seems some misunderstanding, currently I have updated the auth to 'manual', so now I did not use the external database for auth any more, that is used previously.
Thanks a lot.
I seem to have misinterpreted what you meant by "previously"; I didn't realize you were implying that it was no longer integrated with phpBB.
Anyway, in answer to your question, I cannot find any place in the Moodle docs that say not to use uppercase letters in usernames, or that they are converted to lowercase. In fact, the opposite is implied: see http://docs.moodle.org/en/Can_not_log_in