Very old version 1.4 or so only stopped working on bluehost

Very old version 1.4 or so only stopped working on bluehost

by John Matylonek -
Number of replies: 14

In my moodle directory on Bluehost

The moodle error log says

[24-Feb-2020 16:41:28 UTC] PHP Fatal error:  Cannot use 'object' as class name as it is reserved in /home4/oregonh3/public_html/tutorials/lib/setuplib.php on line 67

suddenly changed to:

[25-Feb-2020 00:32:46 America/Boise] PHP Fatal error:  Cannot use 'object' as class name as it is reserved in /home4/oregonh3/public_html/tutorials/lib/setuplib.php on line 67

with the latest error still:

[30-Apr-2022 09:57:31 America/Boise] PHP Fatal error:  Cannot use 'object' as class name as it is reserved in /home4/oregonh3/public_html/tutorials/lib/setuplib.php on line 67

Line 67 in the setuplib.php

file is:

class object extends stdClass {};

With result being a 500 server error

Is it still possible to run my pages?

Average of ratings: -
In reply to John Matylonek

Re: Very old version 1.4 or so only stopped working on bluehost

by Ken Task -
Picture of Particularly helpful Moodlers

Bluehost probably provides you cPanel with which you can browse files in their File Manager.   Your moodle code is in /home4/oregonh3/public_html/tutorials/.

In tutorials there is a version.php file.   It should have a line like: $release  =

What does it show?

Comment:

Uhhhh ... 1.4 or so ... is ancient!    IF it is a 1.x, am surprised Bluehost would allow your server to remain running as your PHP would be old, your Apache would be old, as well as you kernel (if Linux) ... probably has reached end of life.

If that's true of your server environment, your server is a danger to other Bluehost customers as well as all of internet! ;)

Could be your hosting provider is trying to keep your server alive on shared hosting setup and might have upgraded your php.   Bluehost doesn't want a bad rep for 'not taking care of customers', etc.

Comments are my own ... and meant in the 'spirit of sharing' ....

'SoS', Ken

In reply to Ken Task

Re: Very old version 1.4 or so only stopped working on bluehost

by John Matylonek -
Hi Ken

Below is the version 3 I believe....so I guess we don't have to worry. But if Install a new version and point to my data files in OHGSonline would that update the site?

// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .

/**
* MOODLE VERSION INFORMATION
*
* This file defines the current version of the core Moodle code being used.
* This is compared against the values stored in the database to determine
* whether upgrades should be performed (see lib/db/*.php)
*
* @package core
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

defined('MOODLE_INTERNAL') || die();

$version = 2010122900; // YYYYMMDD = date of the last version bump
// XX = daily increments

$release = '2.0.1+ (Build: 20101229)'; // Human-friendly version name
In reply to John Matylonek

Re: Very old version 1.4 or so only stopped working on bluehost

by Ken Task -
Picture of Particularly helpful Moodlers

Last line shows it's a version 2.0.1+ and build date year 2010.

Like I thought/suggested ... 'ancient'! sad

To answer:

'But if Install a new version and point to my data files in OHGSonline would that update the site?'

new version would have to be the highest 2.x.x to start and the site would then have to be 'marched' version wise upwards certain versions at a time ... while at the same time or appropriate time upgrade the PHP AND the MySQL.

Can your server do that?

Got cPanel Terminal icon?

If so, click it, and at the black screen shell prompt type:

uname -an then press ENTER.

What does that show?

Sent you a PM on this site.   Advise you take up the offer!

'SoS', Ken


In reply to John Matylonek

Re: Very old version 1.4 or so only stopped working on bluehost

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

I agree with Ken, these errors are almost certainly because the host has removed support for PHP 5.x. So the errors are because it's trying to run the 17-year-old Moodle 1.4 code on PHP 7.x or PHP 8.x. This won't work.

PHP 5.x has been unsupported since 2018 so you're lucky your host kept it running for this long.

Is it possible to run your site? You would need to find someone willing to host out-of-date software, old versions of Moodle, PHP, MySQL and Apache. This would be a security risk for them, for you and for any users with personal data on your site, as such old software may have vulnerabilities or simply be lacking recent security improvements.

The best solution would be to migrate to supported software versions but if you've been happy with Moodle 1.4 all this time maybe you would be reluctant to take this route.

Average of ratings: Useful (1)
In reply to Leon Stringer

Re: Very old version 1.4 or so only stopped working on bluehost

by John Matylonek -
I will install the latest version of moodle. I wonder if the automatic installation process will be able to use my old data files? This is a small site, but I would love to get at the text of a couple of quizzes from the old source files.
In reply to John Matylonek

Re: Very old version 1.4 or so only stopped working on bluehost

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

The version.php you shared suggests it's actually Moodle 2.0. Either way there is an upgrade path, although this takes a bit of work as you need to upgrade to specific Moodle versions switching the PHP and MySQL versions for each.

Backups of your courses may be a simpler way to keep key parts of your site on a new Moodle version.

In reply to John Matylonek

Re: Very old version 1.4 or so only stopped working on bluehost

by Ken Task -
Picture of Particularly helpful Moodlers

to make things more complicated ... site is now throwing error 500's - no web access to it and it appears to be on shared hosting ... over 1,300 domains using the same IP address as OP's domain.

Server is a Linux box is it not?

Not looking good  ... unless you've taken a site backup or course backups recently - and downloaded them or archived them on server in an area where you could see those zips/mbz's via other tools ... like cPanel file browser.

'SoS', Ken


In reply to John Matylonek

Re: Very old version 1.4 or so only stopped working on bluehost

by Ken Task -
Picture of Particularly helpful Moodlers

"...the automatic installation process ..." ... are we referring to Softaculous or other one-click wonder?   If so, a definite NO!

Know at this stage, the only hope you have is if you made any course backup in the past.   If so, those backups are stored in your moodledata/filedir/ directory ... *BUT* not by humanly recognizable names - rather - contenthash value from DB ... not only is the contenthash value file name, but it's also used in the path to the file.

Take a gander at your moodledata/filedir/ in cPanel.

Did your quizzes use any images in them?   If so, those images are stored in moodledata/filedir/

The quizzes themselves are spread over several tables in the DB.

Guess you could use phpMyAdmin in cPanel and export those tables - those would be sql  dumps, but they are ascii and you could call them up in notepad or text edit to copy and paste text into something you could use to restore the questions on new site.   Uhhh, before you ask ... no don't think you could use those tables and directly replace or import into the same tables on a 4.0 site!

BTW, found your profile on LinkedIn ... impressive ... with those credentials and experience - and some patience, time, etc. you could probably figure all this out! [eventually] smile

Questions are ... do you have the patience/time/true 'tolerance' for fail and try again?

Seriously, do take up the offer given to you in PM on this system.   Won't be there forever! smile

'SoS', Ken

In reply to John Matylonek

Re: Very old version 1.4 or so only stopped working on bluehost

by Brijesh Kothari -
Hi,

I am from the Softaculous team and we have not tested installing Moodle with old data files. Softaculous can install Moodle only by creating new data files.
Average of ratings: Useful (2)
In reply to Brijesh Kothari

Re: Very old version 1.4 or so only stopped working on bluehost

by Ken Task -
Picture of Particularly helpful Moodlers
Well that's good to know. So not a tool to use in a migration + update or upgrade.
'SoS', Ken
In reply to Brijesh Kothari

Re: Very old version 1.4 or so only stopped working on bluehost

by Brijesh Kothari -
I think I could not explain myself correctly here.

Softaculous does Support Moodle Upgrades using the existing files/database.

However if you want to install a new Moodle and manually move the data files that is not supported automatically but you can definitely install a new Moodle via Softaculous and copy the config.php file and moodledata files to the new installation.
In reply to John Matylonek

Re: Very old version 1.4 or so only stopped working on bluehost

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
I can't believe you had a Internet facing Moodle 1.4 site https://docs.moodle.org/dev/Releases#Moodle_1.4 all these years. If it is really Moodle rel. 1.4 your only chance is to get it running again on the old system software and immediately get backups of every course https://docs.moodle.org/19/en/Course_backup and download. There is a good chance of restoring https://docs.moodle.org/19/en/Course_restore them in currently supported Moodle versions https://docs.moodle.org/dev/Releases#Version_support: https://docs.moodle.org/dev/Releases. But only the course content - you have to give all user data.

If it is Moodle rel. 2.0 it is possible to march the whole site to currently supported versions, including the user data. See the route planer http://www.syndrega.ch/blog/#benchmarking-moodlebox-on-different-raspberry-pi-models.

Edit. Corrected the link to the route planer.
wink

In reply to Visvanath Ratnaweera

Re: Very old version 1.4 or so only stopped working on bluehost

by John Matylonek -
You provide a local file directory file:///home/vr/2022/syndrega/synwww/site/blog/index.html#php-and-dbms-compatibility-of-major-moodle-releases.
In reply to John Matylonek

Re: Very old version 1.4 or so only stopped working on bluehost

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Assuming that your site is now dead with neither course backups no site backups, you could have easily recovered all the uploaded files, if it was a Moodle rel. 1.x. Just navigate the moodledata/ and you will find them nicely ordered according to the course IDs. If it was a newer release, 2.0 or later, the process is much harder. Not that it is impossible, you'll find instructions in these forums.

Strictly, with your current code directory, moodledata/ directory and a sql dump of the database an experienced Moodle can march your site to current versions. Ref. https://docs.moodle.org/19/en/Moodle_migration and the whole series up upgrade documents https://docs.moodle.org/22/en/Upgrading, https://docs.moodle.org/24/en/Upgrading, etc. Usually it is not worth the trouble though, better to recreate the courses from scratch - with the added benefit that the courses may profit from the vast collection of new features since then!