Moodle Upgrade from 1.9.4 to 2.0.5+

Moodle Upgrade from 1.9.4 to 2.0.5+

di Henrik Thorn -
Numero di risposte: 3

Hi Everyone

I hope one of you is able to help me, since I've been kind of stuck. As the headline states, i'm trying to do an upgrade of Moodle from version 1.9.4 to 2.0.5+ and thereafter upgrading to 2.1+. However, when I upgrade I've had some troubles. My setup is the following:

Windows Server 2008 R2, IIS 7 and MS SQL _(SQLSRV). 

When I upgrade from the browser, I got timeouts but solved this by adding options to php.ini, which has helped. However, the upgrades is getting stuck after the plugin-tjek when I click upgrade. It is loading, but nothing is happening. I therefore tryed using the terminal, which has provided me with some aditional information.

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

C:\PHP>php.exe -ae C:\inetpub\wwwroot\admin\cli\upgrade.php
Interactive mode enabled

== Upgrading Moodle database from version 1.9.4 (Build: 20090128) (2007101540) t
o 2.0.5+ (Build: 20111118) (2011033005.08) ==

Your Moodle files have been changed, and you are about to automatically
upgrade your server to this version:

 2.0.5+ (BUILD: 20111118) (2011033005.08)

 Once you do this you can not go back again.

 Please note that this process can take a long time.

 Are you sure you want to upgrade this server to this version?
type y (means yes) or n (means no)
: y
-->System
++ Increasing size of user idnumber field, this may take a while... ++
++ Fixing mnet records, this may take a while... ++
!! This upgrade introduces two new navigation blocks that will replace these blocks: Administration, Courses, Activities and Participants.  If you had set any special permissions on those blocks you should check to make sure everything is behaving as you want it. !!

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

As seen from the output the upgrade stops when adding the two new blocks, but I would suspect that the upgrade is actually trying to do something else. I therefore checked the upgrade_log-table and found that the process is breaking each time after 103 actions - including the start-record. The last record shows the following:

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

103    0    core    2009103000    2011033005.08    Upgrade savepoint reached    NULL        0    1322035109

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

Do any of you have ideas for further debugging, when I do not get any information in any of my log-files?

Best Regards
Henrik

Media dei voti:  -
In riposta a Henrik Thorn

Re: Moodle Upgrade from 1.9.4 to 2.0.5+

di Henrik Thorn -

I've investegated further and have got some log-entries, which might help to inditify the problem at hand.

 

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

[23-Nov-2011 15:00:21] PHP Notice:  Illegal member variable name in C:\inetpub\wwwroot\lib\dml\sqlsrv_native_moodle_recordset.php on line 0
[23-Nov-2011 15:00:21] PHP Stack trace:
[23-Nov-2011 15:00:21] PHP   1. {main}() C:\inetpub\wwwroot\admin\index.php:0
[23-Nov-2011 15:00:21] PHP   2. upgrade_core($version = 2011033005.08, $verbose = TRUE) C:\inetpub\wwwroot\admin\index.php:273
[23-Nov-2011 15:00:21] PHP   3. xmldb_main_upgrade($oldversion = '2008073113') C:\inetpub\wwwroot\lib\upgradelib.php:1384
[23-Nov-2011 15:00:21] PHP   4. upgrade_migrate_files_blog() C:\inetpub\wwwroot\lib\db\upgrade.php:600
[23-Nov-2011 15:00:21] PHP   5. moodle_database->count_records_select($table = 'post', $select = 'module=\'blog\' AND attachment IS NOT NULL AND attachment <> \'1\'', $params = *uninitialized*, $countitem = *uninitialized*) C:\inetpub\wwwroot\lib\db\upgradelib.php:405
[23-Nov-2011 15:00:21] PHP   6. moodle_database->count_records_sql($sql = 'SELECT COUNT(\'x\') FROM {post} WHERE module=\'blog\' AND attachment IS NOT NULL AND attachment <> \'1\'', $params = NULL) C:\inetpub\wwwroot\lib\dml\moodle_database.php:1499
[23-Nov-2011 15:00:21] PHP   7. moodle_database->get_field_sql($sql = 'SELECT COUNT(\'x\') FROM {post} WHERE module=\'blog\' AND attachment IS NOT NULL AND attachment <> \'1\'', $params = NULL, $strictness = *uninitialized*) C:\inetpub\wwwroot\lib\dml\moodle_database.php:1516
[23-Nov-2011 15:00:21] PHP   8. moodle_database->get_record_sql($sql = 'SELECT COUNT(\'x\') FROM {post} WHERE module=\'blog\' AND attachment IS NOT NULL AND attachment <> \'1\'', $params = NULL, $strictness = 0) C:\inetpub\wwwroot\lib\dml\moodle_database.php:1345
[23-Nov-2011 15:00:21] PHP   9. sqlsrv_native_moodle_database->get_records_sql($sql = 'SELECT COUNT(\'x\') FROM {post} WHERE module=\'blog\' AND attachment IS NOT NULL AND attachment <> \'1\'', $params = NULL, $limitfrom = 0, $limitnum = 0) C:\inetpub\wwwroot\lib\dml\moodle_database.php:1270
[23-Nov-2011 15:00:21] PHP  10. sqlsrv_native_moodle_recordset->current() C:\inetpub\wwwroot\lib\dml\moodle_database.php:811
[23-Nov-2011 15:00:21] PHP Notice:  Illegal member variable name in C:\inetpub\wwwroot\lib\dml\sqlsrv_native_moodle_database.php on line 812


[23-Nov-2011 15:00:21] PHP Stack trace:
[23-Nov-2011 15:00:21] PHP   1. {main}() C:\inetpub\wwwroot\admin\index.php:0
[23-Nov-2011 15:00:21] PHP   2. upgrade_core($version = 2011033005.08, $verbose = TRUE) C:\inetpub\wwwroot\admin\index.php:273
[23-Nov-2011 15:00:21] PHP   3. xmldb_main_upgrade($oldversion = '2008073113') C:\inetpub\wwwroot\lib\upgradelib.php:1384
[23-Nov-2011 15:00:21] PHP   4. upgrade_migrate_files_blog() C:\inetpub\wwwroot\lib\db\upgrade.php:600
[23-Nov-2011 15:00:21] PHP   5. moodle_database->count_records_select($table = 'post', $select = 'module=\'blog\' AND attachment IS NOT NULL AND attachment <> \'1\'', $params = *uninitialized*, $countitem = *uninitialized*) C:\inetpub\wwwroot\lib\db\upgradelib.php:405
[23-Nov-2011 15:00:21] PHP   6. moodle_database->count_records_sql($sql = 'SELECT COUNT(\'x\') FROM {post} WHERE module=\'blog\' AND attachment IS NOT NULL AND attachment <> \'1\'', $params = NULL) C:\inetpub\wwwroot\lib\dml\moodle_database.php:1499
[23-Nov-2011 15:00:21] PHP   7. moodle_database->get_field_sql($sql = 'SELECT COUNT(\'x\') FROM {post} WHERE module=\'blog\' AND attachment IS NOT NULL AND attachment <> \'1\'', $params = NULL, $strictness = *uninitialized*) C:\inetpub\wwwroot\lib\dml\moodle_database.php:1516
[23-Nov-2011 15:00:21] PHP   8. moodle_database->get_record_sql($sql = 'SELECT COUNT(\'x\') FROM {post} WHERE module=\'blog\' AND attachment IS NOT NULL AND attachment <> \'1\'', $params = NULL, $strictness = 0) C:\inetpub\wwwroot\lib\dml\moodle_database.php:1345
[23-Nov-2011 15:00:21] PHP   9. sqlsrv_native_moodle_database->get_records_sql($sql = 'SELECT COUNT(\'x\') FROM {post} WHERE module=\'blog\' AND attachment IS NOT NULL AND attachment <> \'1\'', $params = NULL, $limitfrom = 0, $limitnum = 0) C:\inetpub\wwwroot\lib\dml\moodle_database.php:1270
[23-Nov-2011 15:00:21] PHP  10. reset(...) C:\inetpub\wwwroot\lib\dml\sqlsrv_native_moodle_database.php:812
[23-Nov-2011 15:00:21] PHP Warning:  Cannot use a scalar value as an array in C:\inetpub\wwwroot\lib\dml\sqlsrv_native_moodle_database.php on line 818


[23-Nov-2011 15:00:21] PHP Stack trace:
[23-Nov-2011 15:00:21] PHP   1. {main}() C:\inetpub\wwwroot\admin\index.php:0
[23-Nov-2011 15:00:21] PHP   2. upgrade_core($version = 2011033005.08, $verbose = TRUE) C:\inetpub\wwwroot\admin\index.php:273
[23-Nov-2011 15:00:21] PHP   3. xmldb_main_upgrade($oldversion = '2008073113') C:\inetpub\wwwroot\lib\upgradelib.php:1384
[23-Nov-2011 15:00:21] PHP   4. upgrade_migrate_files_blog() C:\inetpub\wwwroot\lib\db\upgrade.php:600
[23-Nov-2011 15:00:21] PHP   5. moodle_database->count_records_select($table = 'post', $select = 'module=\'blog\' AND attachment IS NOT NULL AND attachment <> \'1\'', $params = *uninitialized*, $countitem = *uninitialized*) C:\inetpub\wwwroot\lib\db\upgradelib.php:405
[23-Nov-2011 15:00:21] PHP   6. moodle_database->count_records_sql($sql = 'SELECT COUNT(\'x\') FROM {post} WHERE module=\'blog\' AND attachment IS NOT NULL AND attachment <> \'1\'', $params = NULL) C:\inetpub\wwwroot\lib\dml\moodle_database.php:1499
[23-Nov-2011 15:00:21] PHP   7. moodle_database->get_field_sql($sql = 'SELECT COUNT(\'x\') FROM {post} WHERE module=\'blog\' AND attachment IS NOT NULL AND attachment <> \'1\'', $params = NULL, $strictness = *uninitialized*) C:\inetpub\wwwroot\lib\dml\moodle_database.php:1516
[23-Nov-2011 15:00:21] PHP   8. moodle_database->get_record_sql($sql = 'SELECT COUNT(\'x\') FROM {post} WHERE module=\'blog\' AND attachment IS NOT NULL AND attachment <> \'1\'', $params = NULL, $strictness = 0) C:\inetpub\wwwroot\lib\dml\moodle_database.php:1345
[23-Nov-2011 15:00:21] PHP   9. sqlsrv_native_moodle_database->get_records_sql($sql = 'SELECT COUNT(\'x\') FROM {post} WHERE module=\'blog\' AND attachment IS NOT NULL AND attachment <> \'1\'', $params = NULL, $limitfrom = 0, $limitnum = 0) C:\inetpub\wwwroot\lib\dml\moodle_database.php:1270
[23-Nov-2011 15:00:21] PHP Fatal error:  Call to a member function close() on a non-object in C:\inetpub\wwwroot\lib\dml\sqlsrv_native_moodle_database.php on line 820


[23-Nov-2011 15:00:21] PHP Stack trace:
[23-Nov-2011 15:00:21] PHP   1. {main}() C:\inetpub\wwwroot\admin\index.php:0
[23-Nov-2011 15:00:21] PHP   2. upgrade_core($version = 2011033005.08, $verbose = TRUE) C:\inetpub\wwwroot\admin\index.php:273
[23-Nov-2011 15:00:21] PHP   3. xmldb_main_upgrade($oldversion = '2008073113') C:\inetpub\wwwroot\lib\upgradelib.php:1384
[23-Nov-2011 15:00:21] PHP   4. upgrade_migrate_files_blog() C:\inetpub\wwwroot\lib\db\upgrade.php:600
[23-Nov-2011 15:00:21] PHP   5. moodle_database->count_records_select($table = 'post', $select = 'module=\'blog\' AND attachment IS NOT NULL AND attachment <> \'1\'', $params = *uninitialized*, $countitem = *uninitialized*) C:\inetpub\wwwroot\lib\db\upgradelib.php:405
[23-Nov-2011 15:00:21] PHP   6. moodle_database->count_records_sql($sql = 'SELECT COUNT(\'x\') FROM {post} WHERE module=\'blog\' AND attachment IS NOT NULL AND attachment <> \'1\'', $params = NULL) C:\inetpub\wwwroot\lib\dml\moodle_database.php:1499
[23-Nov-2011 15:00:21] PHP   7. moodle_database->get_field_sql($sql = 'SELECT COUNT(\'x\') FROM {post} WHERE module=\'blog\' AND attachment IS NOT NULL AND attachment <> \'1\'', $params = NULL, $strictness = *uninitialized*) C:\inetpub\wwwroot\lib\dml\moodle_database.php:1516
[23-Nov-2011 15:00:21] PHP   8. moodle_database->get_record_sql($sql = 'SELECT COUNT(\'x\') FROM {post} WHERE module=\'blog\' AND attachment IS NOT NULL AND attachment <> \'1\'', $params = NULL, $strictness = 0) C:\inetpub\wwwroot\lib\dml\moodle_database.php:1345
[23-Nov-2011 15:00:21] PHP   9. sqlsrv_native_moodle_database->get_records_sql($sql = 'SELECT COUNT(\'x\') FROM {post} WHERE module=\'blog\' AND attachment IS NOT NULL AND attachment <> \'1\'', $params = NULL, $limitfrom = 0, $limitnum = 0) C:\inetpub\wwwroot\lib\dml\moodle_database.php:1270
--------------------

In riposta a Henrik Thorn

Re: Moodle Upgrade from 1.9.4 to 2.0.5+

di Luis de Vasconcelos -
Immagine Particularly helpful Moodlers

I recall a similar problem when upgrading from Moodle 1.9 to 2.0. I think I got around it by upgrading to the latest version of Moodle (1.9.1 back then I think) and then upgrading to 2.0.

And temporarily increasing the FastCGI timeout settings solved the timeout problem.