admin/server/environment

admin/server/environment

by Sylvain Houmeau -
Number of replies: 21

Hi everyone,

I just opened a page in my admin and found this:

the page is in admin/server/environment and I found this table:

Name Information Report Status
unicode is required to be installed/enabled. Check
database mysql version 4.1.16 is required and you are running 5.0.27 OK
php version 4.3.0 is required and you are running 4.4.4 OK
php_extension iconv is recommended to be installed/enabled OK
php_extension mbstring is recommended to be installed/enabled OK
php_extension curl is recommended to be installed/enabled OK
php_extension openssl is recommended to be installed/enabled OK
php_extension tokenizer is recommended to be installed/enabled

The last line is not described as 'OK', but I don't know what to do with this.

Can someone tell me?

many thanks

sylvain

Average of ratings: -
In reply to Sylvain Houmeau

Re: admin/server/environment

by Sativa Huang -
Hi, Sylvain.
The system just to remind you that your database is not utf8 (unicode). utf8 is important for displaying other characters, eg. Chinese, Japanese, Arabic, Greek correctly, so if you don't have any problem, personally I don't think you need to perform the utf8 migration (cmiiw).
However, if you would like to do so, you must modify your database. In fact, it's not difficult to handle. Just let's me know if you want to migrate to utf8, I would glad to show you how.
In reply to Sativa Huang

Re: admin/server/environment

by Daniela Herrera -
Hi! I have the same problem.. and it wont let me finish the installation process if I don't fix that. Could you help me?
I just installed wamp5 for windows xp home.. I'm working on localhost.. I need to run some tests. I have the new version of moodle.

Thx!!
In reply to Daniela Herrera

Re: admin/server/environment

by Sativa Huang -
Dear Daniela,
I have tried WAMP + Moodle 1.8.2+ in Windows XP Prof twice. Without any problems. First of all, you have to create an empty database using phyMyAdmin:
- http://localhost/phpMyAdmin
- collation = utf8_general_ci

Or maybe you would like to tell us more what you have done and the issue.

Regards
In reply to Sativa Huang

Re: admin/server/environment

by Sativa Huang -

Hi Daniela,
Since we used the same WAMP + Moodle, but different PC, and the result was also different, this means the problem is not caused by WAMP or Moodle. Here is a posting regarding how to enable utf-8 in Apache, maybe you would like to try it:
http://padawan.info/web/debugging_charset_encoding_mismatch_with_apache.html

You may also try to install the server and Moodle to a USB stick:
http://www.chsoftware.net/en/useware/wos/wos.htm

Good Luck.

In reply to Sativa Huang

Re: admin/server/environment

by Dave Gait -

Hi Sativa,

I have a running (with random faults - losing forum postings) Moodle 1.8.2 with almost the same report as Sylvain in Server/Environment - it tells me that unicode needs to be installed/enabled.

BUT when I checked my database, its collation is utf8_unicode_ci, with a UTF-8 Unicode character set.

So now I'm puzzled as to why moodle is telling me one thing and cpanel shows me something different.

I thought the database mod might help my problem with postings going missing after they've been put up in forums, but now I've no idea why.

Anyone got any ideas??

In reply to Dave Gait

Re: admin/server/environment

by Sativa Huang -

Hi,
Check your database with phpMyAdmin:
- Open phpMyAdmin.
- Choose Moodle database
- Scroll to the end of your database entry
- check the summary of the database, is it utf8?

Attachment utf8.jpg
In reply to Sativa Huang

Re: admin/server/environment

by Richard Enison -

DG,

Not being a PHPMyadmin expert, I don't know whether SH's summary table is totally adequate, but it seems to be a step in the right direction. What I do know is that, in addition to the database's default character set and collation needing to be utf8, so do all the tables in it, as well as every column of every table.

RLE

In reply to Sativa Huang

Re: admin/server/environment

by Dave Gait -

Hi (and thanks)

I did as you said and chose my moodle database, and after it had loaded the entry as I scrolled down every table's collation is latin1_swedish_ci and that's the collation of the summary, too.

So it isn't what I thought (sorry for that - instead of selecting the moodle database, I just read the opening page of phpMyAdmin and thought it applied to my moodle database). Moodle is quite correct, and I need to alter the collation of all the tables in my database.

Can I do this and collate all the tables while they have data in them??

What is the best way to fix this??

Thanks again for your help so far! 

In reply to Dave Gait

Re: admin/server/environment

by Sativa Huang -

Don't mention it. smile
The possible solution as follows:

Backup & UTF-8 Migrating:

  • Use phpMyAdmin or MySQL to backup your database (e.g. mdle1.sql)
  • Utilise Notepad or Notepad2 to open mdle1.sql, convert the current  charset, e.g. latin1 to utf8 (Edit > Replace > Replace all)
  • Check if there are any utf8_swedish_ci, utf8_unicode_ci or other  encodings, convert all of them to utf8_general_ci.
    Note: utf8_unicode is also applicable. Utf8_general works faster but less accurate than utf8_unicode_ci.
  • Saving mdle1.sql in UTF-8 and Zipping it.

Database Restoring & Config.php adjustment:

  • Use phpMyAdmin for creating a new empty database, e.g. mdle1, choose utf8_general_ci for Collation.
  • Apply MySQL to add user to the new database, i.e. mdle1, set Privileges to ALL.
  • Import your old but UTF-8 migrated database to mdle1.
  • Backup your moodle/config.php, modify moodle/config.php, adjust the database name (mdle1), database username and password (if needed) 
  • If it worked, consider to delete your old database.

Regards,

In reply to Sativa Huang

Re: admin/server/environment

by Dave Gait -

Many thanks for your outline of what to do!

As I'm new to all of this, can I just check that I've understood your instructions properly?

Backup and UTF-8 Migrating

1. I use phpMyAdmin to backup my old database (mdle1.sql) and put it somewhere safe.

2. I use Notepad to open the old database (mdle1.sql) and convert the current charset to utf8 using edit>replace>replace all.

3. Check if there are any other utf8 encodings than the one I want to use, and if there are, convert all of them. (You suggested utf8_general_ci which I had read is faster, but I may want to use greek and hebrew on the site so perhaps I should use utf8_unicode_ci?).

4. Save the modified database (as mdle2.sql?)

Database Restoring and Config.php adjustment

5. Use phpMyAdmin to creat a new empty database, with a new name (say mdle2.sql) and utf8 collation

6. Use MySQL to add a user to the database (mdle2.sql) and set Privileges to ALL

7. Import my old but modified to utf8 dtabase (mdle2.sql) to mdle2.sql.

8. Backup my moodle/config.php, then modify moodle/config.php to adjust the database name (mdle2.sql), database username and password as needed.

9. If it all worked, I can then in cpanel delete mdle1.sql, otherwise I revert to my backup config.php file.

Is it possible that the problem I am having with postings disappearing from some course forums, and not others, is related to the fact that I've been running with the database having an incorrect collation??

Thanks again for all your help!

In reply to Dave Gait

Re: admin/server/environment

by Sativa Huang -

Hi, Dave! Welcome back smile

2. I use Notepad to open the old database (mdle1.sql) and convert the current charset to utf8 using edit>replace>replace all.
Notepad2 is better than Notepad, you can download it here:
http://www.flos-freeware.ch/notepad2.html

If your database is too big to be handled by notepad, try to use Word and save it as *.sql, e.g. mdle2.sql (UTF-8).

3. Check if there are any other utf8 encodings than the one I want to use, and if there are, convert all of them. (You suggested utf8_general_ci which I had read is faster, but I may want to use greek and hebrew on the site so perhaps I should use utf8_unicode_ci?).
Sure, you may use utf8_unicode_ci too. 
Check if there is any _swedish_,
make sure to change latin1 to utf8; latin1_swedish_ci to utf8_unicode_ci. 

Is it possible that the problem I am having with postings disappearing from some course forums, and not others, is related to the fact that I've been running with the database having an incorrect collation??
Not sure if there is any relationship. However, since you want to use Greek and Hebrew, it would be better if your database encoding is utf8.

Good luck

In reply to Sativa Huang

Re: admin/server/environment

by Richard Enison -

To whom it may concern,

2. I would add that if you use MS Word, make sure you save the .sql file as a text file, not a Word document!!!

Also, not only is it better to use utf8; if you plan to use Moodle 1.8 or higher, it is required.

RLE

In reply to Richard Enison

Re: admin/server/environment

by Sativa Huang -

Hi, Richard.
Yes, the database should be saved in text format, thanks.
Afaik, the unicode will only be required for installing Moodle manually (not using Fantastico) or version upgrading, otherwise the installation could not be performed. When using Fantastico, the database encodings are almost created automatically in latin1_swedish_ci and fortunately, the latin1 won't be an issue if the website only runs in English (cmiiw).

In reply to Sativa Huang

Re: admin/server/environment

by Richard Enison -

SH,

If you mean that as long as you stay with versions of Moodle below 1.8, I agree. But 1.8 and higher require Unicode, even for sites that use 100% English.

And if you mean that the character codes for English characters are the same for UTF8 as they are in Latin1 or even ASCII, that's probably largely true, but you still have to call it UTF8 if you are going to use Moodle 1.8 or higher.

Which is another reason to add to several I have seen in this forum for not using Fantastico to install Moodle.

RLE

PS I tried to post this last night (my time), but for the second time in a day, moodle.org seemed to be down.

In reply to Richard Enison

Re: admin/server/environment

by Sativa Huang -
Hi, Richard.
Thanks for the explaination. Yes, if using Fantastico to install Moodle, the database encoding will be latin1 and it cannot display certain characters correctly, thus manual installation is the best choice.

Regards,
In reply to Sativa Huang

Re: admin/server/environment

by Dave Gait -

Hi Sativa,

I've completed the database migration and now have a clean server environment report and a working site.

I'll try out the forum postings to see if the database collation correction has fixed that problem.

Many thanks again for your help.

PS thanks for the link to Notepad2 - like it!

In reply to Dave Gait

Re: admin/server/environment

by Sativa Huang -
Well done, Dave!
Please keep informing us your progress, hope you can solve your forum posting issue. I believe there is always a solution.

Regards,
In reply to Sativa Huang

Re: admin/server/environment

by Dave Gait -

Hi Sativa,

I've posted several requests in the "forum" thread, detailing my problem with posts (whole discussions) disappearing - firstly on September 20 and 22, and then again on 4 October - but so far nobody has replied.

What can I do next??

Dave

In reply to Dave Gait

Re: admin/server/environment

by Sativa Huang -

Hi, Dave!
Whole discussions have disappeared?! It seems your problem is getting worse, since you have mentioned before that only some of your posts have disappeared. wide eyes.

Well, just take a look into your database by using phpMyAdmin. Check if there are any data inside the mdl_forum_* entries. For example, I have two postings in my forum named "Testing Cron" and "Testing Cron for the first hand".

Anyway, if your data don't have any confidential issue and you would like to send it for me, I will try to find out if there is any solution. My email is sativahuang@gmail.com.

Regards,

Attachment forum.JPG
In reply to Sativa Huang

Re: admin/server/environment

by Dave Gait -

Hi Sativa,

When I look in my database in the forum discussion, I find five discussions that correspond with the posted discussions still visible on my moodle site.

But when I look in the forum posts table, I can find posts that can no longer be seen on the site, as well as all the ones that can be seen.

The post id's go from 1 to 105, but with only 31 posts in the entire table - around 70+ have gone.

Out of the ones that can be seen in the database table, about 15 cannot be viewed on the site (but used to be visible).

What data would you like me to send you??

Dave

my email is dave.gait@btinternet.com

In reply to Dave Gait

Re: admin/server/environment

by Dave Gait -

Hi Sativa (and Richard)

Between you, I think I've sorted my problem of postings disappearing out of some forums...

When I looked into it, I discovered that my moodle site had been installed using fantastico - hence the problem with the database collation being latin1_swedish.

Now that I've migrated the database collation to utf8_general, after an initial day or so to settle down, everything seems to be working properly - no more postings have been lost since the day after I did the migration.

Thanks for all your help!

Dave