Update from 3.5.1 on Bluehost

Update from 3.5.1 on Bluehost

by Roger Leeper -
Number of replies: 8
Help needed with a stalled update. I have a Bluehost Linux reseller account with access to phpAdmin. 

Moodle Data, html content, and mysql db backed up, began update to v 4 with no luck, so I tried rolling back. 

Version 3.5.1 no longer works after re-installation. Pages display but I can't login, and no message gets sent for user or password recovery. 

Now getting error: Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home2/****/public_html/mod/forum/lib.php on line 8450

Thanks in advance for help with that and for any other suggestions on items to check.
Average of ratings: -
In reply to Roger Leeper

Re: Update from 3.5.1 on Bluehost

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Well, to start with, if you had checked release notes, you would have seen that you cannot upgrade to 4 from 3.5. Also 4 is not supported any more. So, you will need to go to 3.9 and then onto 4.1 or later. Also, you need to check database and php versions along they way as they have changed.
For your current issue, I would suggest reinstalling the backups again (moodledata, database and code - make sure you copy over the plugins from your original 3.5 folder.). If you made any php changes, unmake them. Then delete the cache and localcache folders from your moodleDATA (not code) folder to make sure you are not having issues there.
In reply to Emma Richardson

Re: Update from 3.5.1 on Bluehost

by Roger Leeper -
Thanx for the prompt reply Emma. Deleted caches, now getting: Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home2/****/public_html/mod/forum/lib.php on line 8462 My hosting company offers php 7.3 and above; Moodle v3.5.1 installed requires php 7.2, no longer available from Bluehost. Plan B?
In reply to Roger Leeper

Re: Update from 3.5.1 on Bluehost

by Ken Task -
Picture of Particularly helpful Moodlers
But you have a reseller account - you might beg/plead with hosting provider to put back PHP 7.2 - you are the only customer affected by that.

OR ... and this is not good ...

a blind upgrade from 3.5.x to the highest of 3.6 as that can run under php 7.3.
See chart:

Beyond that you are in for a 'mini-march' ... once you get the 3.6.highest up and running, go to admin/server/environment and update component.
Then use the moodle version drop down pick list for all versions of Moodle higher than 3.6 and note what moodle says you will need ... expect higher version of PHP + extensions and maybe DB version as well.   Also changes to DB character set and collation.

Since you have reseller account, you have access to the instance as root user via Terminal.
And I'll bet git is present as well.   You haven't mentioned what operating system this is ...
IF you have CentOS 7 you are looking at a server migration to something supported - March of 2024.

'SoS', Ken
In reply to Ken Task

Re: Update from 3.5.1 on Bluehost

by Roger Leeper -
Thanx Ken. Got a 'hell no' on rollback, and not finding Terminal in cPanel from Bluehost. Will try installing 3.6.

Also installed Mamp on my Mac, but no luck on getting my backup to run there yet. Tips welcome there as well.
In reply to Roger Leeper

Re: Update from 3.5.1 on Bluehost

by Ken Task -
Picture of Particularly helpful Moodlers
Earlier you said you had "Bluehost Linux reseller account".
But no Terminal?!!!???? ... you mean in cPanel ... but what about Web Hosting Managment ... would think a reseller account had that!


'SoS', Ken


In reply to Ken Task

Re: Update from 3.5.1 on Bluehost

by Roger Leeper -
Support advised Terminal not available on cPanel or WHM, but can access via Putty client. Also have Terminal on my Mac, but made progress with the install of Moodle 3.6.

Rolled back to php 7.3 and installed a fresh Moodle 3.6. It works!

Updated config.php to point to mysql data from my 3.5.1 installation, with the resulting error message:

Error: Database connection failed

It is possible that the database is overloaded or otherwise not running properly.

The site administrator should also check that the database details have been correctly specified in config.php

Debug info: Access denied for user '****'@'localhost' (using password: YES)
Error code: dbconnectionfailed
Stack trace: 
  • line 564 of /lib/dml/mysqli_native_moodle_database.php: dml_connection_exception thrown
  • line 340 of /lib/dmllib.php: call to mysqli_native_moodle_database->connect()
  • line 620 of /lib/setup.php: call to setup_DB()
  • line 936 of /config.php: call to require_once()
  • line 88 of /admin/index.php: call to require()
Questions:
1) Is action needed from the working Moodle 3.6 admin side first? If yes, then what?
2) What edits are needed on the 5 offending files?

Seems a lot closer today so thanx for your help so far and in advance for any more to come!