Stuck at Server Checks? | Moodle 2.0.3 to 2.2.4

Stuck at Server Checks? | Moodle 2.0.3 to 2.2.4

by Francois Evans -
Number of replies: 18

Am running update from Moodle 2.0.3 to 2.2.4.

After initiating the upgrade process, I'm taken (as expected) to the Server Check page viz:

 

 

The page shows no errors. The thing is, it then stays on this page. I know the update process can take a very long time, but should there not be an indicator that the updating is actually taking place, e.g. a loading bar?

Alex Büchner's wonderful 'Moodle 2 Administration' book (on p37) says:

Once this screen has been confirmed, the actual installation starts

That's great, but I can't see how to 'confirm' the screen ...or whether it needs confirming at all.

Any advice gratefuly received.

 

François. blush

Average of ratings: -
In reply to Francois Evans

Re: Stuck at Server Checks? | Moodle 2.0.3 to 2.2.4

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear François,

But the page is showing errors - the two 'checks' at the top and the 'You must solve' in red at the bottom.  By the looks of things you need 'unicode' and 'Intl' to sort.  Clicking on the blue line for each should bring / take you to a help page that tells you what you need to do.

Cheers,

Gareth

Average of ratings: Useful (1)
In reply to Gareth J Barnard

Re: Stuck at Server Checks? | Moodle 2.0.3 to 2.2.4

by Francois Evans -

Thanks Gareth,

So 'check' means 'this needs to be checked' and not 'this checks out OK'. Hmm. ...Could be clearer. angry

 


Server Check Errors

 


 

1. The above unicode error message links to:

http://docs.moodle.org/20/en/admin/environment/unicode

...but that page does not explain how to 'perform the UTF-8 migration process'. I have found migration instructions here though:

http://docs.moodle.org/23/en/Converting_your_MySQL_database_to_UTF8

 ...though that page only explains ways of doing this via command lines. I'll have to try to find a way of doing this via phpMyAdmin. Never done this before.

 

2. The above php_extension error message links to:

http://docs.moodle.org/20/en/admin/environment/php_extension/intl

 ...though that page also only explains ways of doing this via command lines. Mention is made of 'system package manager', but I don't know what that is.

Am checking this page out:

http://docs.moodle.org/23/en/Beginning_Moodle_2.0_Administration

If anyone can provide simple instructions for how to do the above I'd be very grateful indeed and would be able to update our Moodle system.

Big thanks,

François.

In reply to Francois Evans

Re: Stuck at Server Checks? | Moodle 2.0.3 to 2.2.4

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

For charset use the SQL tab...

Average of ratings: Useful (1)
In reply to Gareth J Barnard

Re: Stuck at Server Checks? | Moodle 2.0.3 to 2.2.4

by Francois Evans -

Thanks Gareth, this is helpful.

I'm completely unused to command-line environment and am assuming that I have to change the 'moodle22' name to the name of the main database Moodle is hooking into? - Is that right?

Otherwise, what is 'moodle22' referring to?

F.

In reply to Francois Evans

Re: Stuck at Server Checks? | Moodle 2.0.3 to 2.2.4

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

For Intl on an apache under windows system, edit the php.ini file and enable the extension like so, then restart apache in services.  Could be similar for other OS's / Web Servers.  What is yours?

In reply to Gareth J Barnard

Re: Stuck at Server Checks? | Moodle 2.0.3 to 2.2.4

by Francois Evans -

We're on a Linux system. I have access to phpMyAdmin via CPanel.

I'm not sure what you mean by 'enable the extension'.

How does one 'restart apache' in 'services'?

Kind thanks,

F.

In reply to Francois Evans

Re: Stuck at Server Checks? | Moodle 2.0.3 to 2.2.4

by Francois Evans -

In essence...

A.

unicode - 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).

B.

php_extension - intl - should be installed and enabled for best results. Intl extension is used to improve internationalization support, such as locale aware sorting.


-------------------

1. I am getting the above two error messages when running Server Check from Moodle before upgrading from Moodle 2.0 to Moodle 2.2.

2. I know that the above can be fixed from command-line environment, but am unconfident in using that option. I would rather do this from the graphic user interface of phpMyAdmin.

3.

(i) Does anyone have step-by-step instructions for how to perform the UTF-8 migration process using phpMyAdmin?

(ii) Which 'Admin.' page is the first message above referring to?


4. How do I install and enable php_extension intl using phpMyAdmin?


With kind thanks! mixed


François.

In reply to Francois Evans

Re: Stuck at Server Checks? | Moodle 2.0.3 to 2.2.4

by Guillermo Madero -

Hi François,

First of all, if you check both messages, one says "must" and the other says "should". Then, you only need to fix the first one (Unicode) to get you upgrade running.

Regarding your question about moodle22, yes, that refers to the name of your moodle database and so you need to modify that text to correspond to your actual database name.

--- 

It is a bit surprising that you are getting a Unicode error, as your Moodle 2.0.3 database should already be complying with this requirement.

Anyway, as you are upgrading (i.e. working with a previous database), statements like:

ALTER DATABASE db_name DEFAULT CHARACTER SET charset_name DEFAULT COLLATE collation_name;

ALTER TABLE tbl_name DEFAULT CHARACTER SET charset_name COLLATE collation_name;

will not change your data, they will only define the character set and the collation to be used on new tables and new columns, respectively.

While you can first execute (in phpMyAdmin) the following SQL statement:

ALTER DATABASE db_name DEFAULT CHARACTER SET charset_name DEFAULT COLLATE collation_name;

and then the following for each table:

ALTER TABLE tbl_name CONVERT TO CHARACTER SET charset_name COLLATE collation_name;

you could actually risk mangling your database (for a number of reasons). Instead, you should use the MODIFY clause to change each and every individual text type (char, varchar, text, etc.) column required (i.e those columns not in utf8) of each and every table, like so:

ALTER TABLE tbl_name MODIFY col_name  col_type CHARACTER SET charset_name COLLATE collation_name;

Of course, to do that, you would first need to determine which columns actually need to be updated and then update them.

--- 

Please start by running the following three SQL queries in your phpMyAdmin:

SELECT schema_name, default_character_set_name "character_set", default_collation_name "collation"
FROM information_schema.schemata
WHERE schema_name = 'db_name';

SELECT t.table_name, ccsa.character_set_name "table_character_set", t.table_collation
FROM information_schema.`tables` t,
information_schema.`collation_character_set_applicability` ccsa
WHERE ccsa.collation_name = t.table_collation
AND t.table_schema = 'db_name';

SELECT table_name, column_name, data_type, character_set_name, collation_name, column_type
FROM information_schema.columns
WHERE table_schema = 'db_name'
AND data_type IN ('char', 'varchar', 'tinytext', 'text', 'mediumtext', 'longtext', 'enum', 'set');

save the results of each query into an Excel file (using the Export link), take note of the character set and collation of the database, the tables and the columns, and report back.

---

Finally:

  • Regarding the intl php_extension issue, that cannot be fixed via phpMyAdmin. You, or your service provider, need to enable it by installing the extension (a Windows "intl.dll" file or a Unix "intl.so" file) and modifying the php.ini configuration file.
  • And the 'admin' page in question is: http://docs.moodle.org/23/en/admin/
Average of ratings: Useful (2)
In reply to Guillermo Madero

Re: Stuck at Server Checks? | Moodle 2.0.3 to 2.2.4

by Francois Evans -

Wow Gillermo; thank you so much for this detailed help.

It seems I've reached a point where I have no option but to get to grips with command-line environments. All new to me. Scary.

François.

In reply to Francois Evans

Re: Stuck at Server Checks? | Moodle 2.0.3 to 2.2.4

by Guillermo Madero -

François,

Haha, I get the feeling as I've been there! Don't worry, you can start by running the SQL queries from phpMyAdmin, and depending on the results, the solution might be doable from phpMyAdmin itself. The idea is just to get a clear idea of how many tables/columns need updating and how are they defined, so as to be able to find the best solution.

Cheers!

Average of ratings: Useful (1)
In reply to Guillermo Madero

Re: Stuck at Server Checks? | Moodle 2.0.3 to 2.2.4

by Francois Evans -

Dear Guillermo,

Thank you for your effective tips. smile

I have followed your instructions to the letter, and run the three SQL queries in phpMyAdmin. The resultant schemata, tables and columns spreadsheets are attached in Excel format the zipped file.

My phpMyAdmin displays two databases: one called information_schema, the other which I have called mdxpanet_mdl, - which is our Moodle database. The SQL queries run (results attached) relate to the mdxpanet_mdl database.

Three questions:

1. Should I also have run the three SQL queries for the information_schema database?

2. What should I be looking for in the exported spreadsheets? In the tables and columns spreadsheets, all rows seem to contain 'utf8'. The schemata spreadsheet's single row however, does not list utf8. - Could that be the problem?

3. What is the difference between a 'schema/schemata', a 'table' and a 'column'?

Again: thanks for your help Guillermo, I'm much obliged for your advice. Alex Büchner does not give any advice on solving this basic ugrading issue in his excellent book on Moodle 2 Administration, and the book php 6 and MySQL 5 by Larry Ullman gives very specific programming instructions, but unrelated to anything in Moodle. It's difficult to make the connections.

Yours truly,

 

François.

 

In reply to Francois Evans

Re: Stuck at Server Checks? | Moodle 2.0.3 to 2.2.4

by Guillermo Madero -

Hi François,

Well, you're lucky! smile Indeed, the problem only resides in the definition of the database, as it is defined with a latin1 character set. The tables and their columns are Ok, as they are all utf8, as you mention.

You can fix the database definition (from phpMyAdmin) with the following SQL statement:

ALTER DATABASE `mdxpanet_mdl` DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;

Regarding your questions:

1. No. The information_schema database is the internal MySQL database where MySQL stores all the information about all the user's databases, tables and columns, among other things (and that's why one shouldn't modify anything in this database directly!).

2. Yes, that was the problem. The idea of these queries was to list the character set and collation definition of each component to see which had a different specification. As you could confirm, only the database was using latin1/latin1_swedish_ci, and that's where the problem was.

3. The term "schema" is just equivalent to the term "database". A schema contains "tables", where each table contains "rows" (also known as "registers"), and where each row is composed of "columns" (also known as "fields"). In each column is where data actually resides. The "schemata" table (which belongs to the MySQL internal database information_schema) is where MySQL stores information about databases (schemas).

To learn a bit more about databases, you might want to take a look at the following:

http://www.quackit.com/database/tutorial/
http://www.atlasindia.com/sql.htm

I'm still working on this page (and so the structure might change once it is finished), but you might also want to read it, as it contains useful information:

http://docs.moodle.org/dev/Reference

Cheers!

Average of ratings: Useful (2)
In reply to Guillermo Madero

Re: Stuck at Server Checks? | Moodle 2.0.3 to 2.2.4

by Francois Evans -

Dear Guillermo,

Sheesh! - I'm lucky to have your help.

Will run the script and do my homework from your useful web links. I read the chapter on Unicode, UTF-8 and charsets in a book on php and it made many things clearer.

I'm still not sure how I should install and enable the php_extension. Gareth Barnard's kind post above shows a screenshot of this being done on a Windows system, but we're on a dedicated server running Linux.

Thanks for your amazing help. big grin - Hope I can return the favours one day.

François.

In reply to Francois Evans

Re: Stuck at Server Checks? | Moodle 2.0.3 to 2.2.4

by Guillermo Madero -

Hi François,

Nooo, I said that you were lucky because you were going to be able to fix the problem via phpMyAdmin! tongueout

About the intl extension, I guess it depends on the OS & PHP versions that you have installed, however, if you are using Ubuntu, it seems that you only need to run:

sudo apt-get install php5-intl
sudo service apache2 restart

I don't know if the install process updates the php.ini configuration file. If it doesn't, then you need to update it by removing the initial semicolon from the following line (or adding it if it doesn't exist):

extension=intl.so

Hope this helps.

In reply to Guillermo Madero

Re: Stuck at Server Checks? | Moodle 2.0.3 to 2.2.4

by Tamara Cowling -

Thanks Guillermo and Francois!

This has been great and I have managed to update my system using your detailed conversation.

Thanks again,

Tammie.

In reply to Guillermo Madero

Re: Stuck at Server Checks? | Moodle 2.0.3 to 2.2.4

by Lisa W -

I have run into the same issue with the check for the UTF upgrade issue stuck at Check.  That is my only Check item, the rest are all OK.

I did the SQL queries and mine also showed the UDF8 so I ran the sql to alter the database:

ALTER DATABASE `my_db_name_here` DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;

Confirmation showed it to be successful.  However, when I go to reload the page the Check is still there and I cannot get past it.  I have even tried in a different browser in case there was a cache issue.

Due to this issue I have lost all my courses, although they are backed up, just need to get past this check.

Any assistance would be incredibly appreciated. 

I have to work tomorrow but will check in as soon as I can.

Lisa