Upgrade to 3.3 and Error reading from database

Upgrade to 3.3 and Error reading from database

by icm admin -
Number of replies: 5

Hi,

i want to upgrade my test moodle from 2.6. to 3.3. i upgrade also my php from 5.3. to 5.6 which was necessary.

and sql version is:    Window SQL Server 2008 R2 


i face this error when i open my web: 


Attachment moodle error.png
Average of ratings: -
In reply to icm admin

Re: Upgrade to 3.3 and Error reading from database

by Ken Task -
Picture of Particularly helpful Moodlers

Not a Windows person, but ... the following is true of any platform ...

Are you attempting to upgrade from 2.6.x straight to 3.1.highest?  Note the .highest there.

No can do.   Must upgrade the 2.6.x to 2.7.highest first.

One of the changes for you is related to theme ... many themes, like the 'afterburner' theme you used in the 2.6 doesn't have a compat version in series 3.x.

Once you get the site upgraded to the 2.7.highest, check it for functionality ... especially any plugins ... get those upgraded and working as well.

Then *backup* the code + do a DB dump.  Don't want to loose ground gained at the 2.7.highest stage.

Then try the upgrade to the 3.1.*highest*.

One cannot hyperjump upwards ... it's more a 'march'.

'spirit of sharing', Ken


In reply to Ken Task

Re: Upgrade to 3.3 and Error reading from database

by katherine tk -

Hello Ken Task,

Thanks for the suggestion. But unfortunate I came through the same error even after 2.7.

Error Loading Database

add_to_log() has been deprecated,please rewrite your code to the new events API

 .line 50 of\lib\deprecatedlib.php: call to debugging()

 . line 133 of\index.php: call to add_to_log()

error reading from database

Debug info:SQLState:42S22<br>

Error Code: 207<br>

Message:[Microsoft][ODBC Driver 11 for SQL Server]Invaild coloumn name 'requiredbytheme'.<br>

SQLState:42S22<br>

ErrorCode:207<br>

Message: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Invalid coloumn name 'requiredbytheme'.

In reply to katherine tk

Re: Upgrade to 3.3 and Error reading from database

by Ken Task -
Picture of Particularly helpful Moodlers

Like I said ... don't run Windows ... but ... 2.6 to 2.7 won't do and the errors you show might indicate you've already upgraded the PHP to a higher version in anticipation of being able to hyperjump.   When it comes  to upgrading from an old to highest, all platforms are in the same boat.   You can't pull the trigger on upgrading PHP until you are sure  the version you have can run the upgrade to the version you are moving to.   That make sense?

Here's why I think the above ...

add_to_log() has been deprecated

So you might have to down grade your PHP so that the uprade to 2.7 will work.

https://docs.moodle.org/dev/Moodle_2.7_release_notes#Server_requirements

PHP 5.4.x or 5.5.x on Windows.

So let's say that works and you do get to 2.7.highest.

Rather than searching the web and a lot of scratching of heads.

Go to Site Admin -> Server -> Environment.

Update the component

Then use the drop down pick list for moodle version and see what Moodle says you'll need ... for php version, for php extensions, for DB config, etc..   You should be able to map out a plan then.

@Tunde ... seldom does one have *exactly* the same problem ... *same exact error* ... but yours might be *similar* to Katherine's.   Anyhoo the same advice ... use the Environment check on existing version to see what you need moving forward from an old version to map out when to upgrade PHP, etc..

'spirit of sharing', Ken


In reply to icm admin

Re: Upgrade to 3.3 and Error reading from database

by Tunde kelvin -
Me too I am having issues reading on my Windows 10 laptop. &nbsp;I receive the :errors loading database" message at app startup, and am asked it I want to view the error log. &nbsp;Error log is blank. sad
In reply to icm admin

Re: Upgrade to 3.3 and Error reading from database

by Andrew Lyons -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

As Ken points out, you cannot upgrade from 2.6 straight to 3.3, you must go via 2.7 first.

I would also recommend visiting http://s2g2cwts.inleap.net/onlinetraining/admin after you've put the code in place, or better still perform the upgrade via CLI.

It appears that you have not run the database upgrade either.

The 'requiredbytheme' column was added in Moodle 3.2 via MDL-56902. If you are still seeing reference to this column, even after switching to the 2.7 codebase, it suggests that you have some of the 3.2 codebase still hanging around.

I would recommend moving your existing installation to one side, and placing a fresh download of Moodle 2.7 in its place, copy of the config.phpl and download any updates for any of your plugins.

Andrew