Backward compatibility question preparing for Moodle 3.4

Backward compatibility question preparing for Moodle 3.4

by Robert Felix -
Number of replies: 22

I am upgrading from Moodle 2.8 to 3.4 and after moving to 3.0, I see that I will need to update my server before doing so. My server is running PHP 5.4 and I'm told I'll need to upgrade to Easy Apache 4 in order to use higher PHP versions. Also, I see a notification that "your database has tables using Antelope as the file format. You are recommended to convert the tables to the Barracuda file format."

Before doing this, I want to make sure I won't have problems with an old legacy version of Moodle (version 1.9), where I have a lot of archived data. Both installs are on the same domain.

Thanks in advance!
Bob

Average of ratings: -
In reply to Robert Felix

Re: Backward compatibility question preparing for Moodle 3.4

by Ken Task -
Picture of Particularly helpful Moodlers

What is 'Easy Apache 4'?   That a Windows thang?  Is it a Window server?

Ouch!   If the 3.0 and the 1.9 are on same 'physical'/virtual server (same IP address) are they sharing PHP and MySQL?  Wasn't there a change to required version of MySQL as well when you checked environment?

1.9 is soooo old now, I don't re-call ... did it have a environment check as well?

'spirit of sharing', Ken

In reply to Ken Task

Re: Backward compatibility question preparing for Moodle 3.4

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Ken, EasyApache is one of the tools that comes bundled with the cPanel suite of tools that is supposed to make server management easier.  Nope, not easier for folks like you who know what they are doing from scratch.

In reply to Rick Jerz

Re: Backward compatibility question preparing for Moodle 3.4

by Ken Task -
Picture of Particularly helpful Moodlers

Thanks, Rick ...

Hmmmmm ... that kinda sounds like 'disqualified' to continue offering free advice because I know too much!!! ;)

2 cents worth then ... in plan/strategy ... not how 2 - with 'Easy Apache 4' ...

Well, what do ya know ... forgot I still had access to a 1.9 on RHEL 5 box whose tech
decision was to let the server die a natural death rather than spend any time/$/or efforts to upgrade it ... go figure.  Uhhhh ... it's been running now for years with no maintenance etc..   Linux Rocks!

1.9 does have environment check, but attempting to update environement check begets:

"Download of component to your server failed, please verify proxy settings, PHP cURL extension is highly recommended.

You must download the http://download.moodle.org/environment/environment.zip file manually, copy it to "/var/www/moodledata/" in your server and unzip it there.
"

Hmmmm already too much trouble, me thinks ... but ... moving forward ...

check in the 1.9 for vr 2.2 says:
php 5.3.2 required but server was using had 5.5.36
mysql version 5.0.25 is required and you are running 5.0.95

To go to any 2.x version higher than 2.2 will be prevented/fail.

So your 1.9 will have to undergo a plan to upgrade php and mysql before certain stages or right after before the next hop  in the upgrade path .... basically 1.9 -> 2.2 -> 2.9 -> 3.0 -> ... higher.    Backup DB and code at each hop upwards so you don't loose ground in case the next hop self-destructs! sad

And when you reach (if you reach) destination version to discover legacy file system, one might actually look back and think better of keeping the 1.9 up as is ... just replicate what was done or download/upload files from the 1.9 into a 3.4.

While you could try course backup from 1.9 restore to 3.x ... good luck with that.

So ..... since Rick has a handle on 'Easy Apache 4' ... he'll be glad to guide you  along your journey!

'spirit of sharing', Ken


In reply to Ken Task

Re: Backward compatibility question preparing for Moodle 3.4

by Robert Felix -

Hi Ken,

Just to clarify, I don't have any plans to upgrade my Moodle 1.9 archive install. As you say, it has been running flawlessly for years. Instead, I'm going to create all new courses in version 3.x, which is a new, clean install, while running 2.8 for my live courses.

But these all reside on the same server, same domain, same MySQL, same PHP.  When I found out that I need to update MySQL and PHP in order to complete the upgrade to Moodle 3.4, I thought I'd better make sure I won't disable my older installs.

Thanks for the assist!
Bob


In reply to Ken Task

Re: Backward compatibility question preparing for Moodle 3.4

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Free advice is always good, and I know that you are highly qualified!  big grin

I was just guessing that you have never stumbled into EasyApache because you would just know how to configure your server from the command prompt.  For example, why would someone struggle to find a Windows utility to get a list of files in a folder when from a DOS command prompt, one can type "dir *.* >files.txt."

"Easy"Apache is probably a bad name.  I really didn't find it easy until I worked with this utility a dozen times.  Up until then, I would have called this "YouHaveGotToBeKidding_Apache."

Having said this, once figured out, EasyApached does provide the ability to install all necessary php extensions by just clicking on them to include them in the build.  That really is easy.  Even that nasty "intl" extension that I am struggling with in XAMPP!

In reply to Ken Task

Re: Backward compatibility question preparing for Moodle 3.4

by Robert Felix -

Hi Ken,

I've got a hosted VPS on a linux server. My server specs are working fine for Moodle 3.0.10, but upgrades are required for going any further.

That's apparently where EasyApache4 comes in - I didn't know what that was either until now...

Bob


In reply to Robert Felix

Re: Backward compatibility question preparing for Moodle 3.4

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Yep, I kind of saw that you just wanted a place to get to your 1.9, if ever needed.

I don't have access to my old server to know if one could have updated to php7 using EasyApache 3, but I will take your word on it.  For me, it was time to either renew my old server for around $40/month, or get a new server at $27/month.  I bit the bullet and decided to get a new server, at the same time install php7 (for moodle 3.4), to go with MariaDB, learn EasyApache4, and basically have a better server for my courses.

In EasyApache4, below I show you the option that I picked.  Then, while customizing, I picked only php7.1 and disabled the others.  I already knew that Moodle 1.9 would not run on this server.  Maybe someday, when I have some time, I might experiment with multiple phps.

Attachment easyapache4.jpg
In reply to Rick Jerz

Re: Backward compatibility question preparing for Moodle 3.4

by Robert Felix -

Very helpful that, and you may have answered my main question: "I already knew that Moodle 1.9 would not run on this server."

If I will disable Moodle 1.9 by upgrading MySQL and/or PHP, then I don't have any choice but to put them at least on separate domains, if not separate servers...

Bob

In reply to Robert Felix

Re: Backward compatibility question preparing for Moodle 3.4

by Ken Task -
Picture of Particularly helpful Moodlers

2 cents more ... in the 1.9 set front page to none none.  Only the login link in the upper right hand corner shows.

Remove all users.

If it's files you are after in the 1.9, make no user backups of the courses you really want to keep.   Download the backup zip ... unzip ... archive the 'files' directory ... that contains the humanly recognized files in a backup ... last time you'll see humanly recognizable names in a backup.

Now you have the files upload to other sites if you want.

Quizzes ... could try to export the quiz bank ... then try to restore the quiz bank to newer version of Moodle.

BTW, if you have command line and not adverse to using cli, one could 'move' those files from the 1.9 to a file system repo in your 3.4. .... moodledata/repository/19files/   Don't have to make backups nor download to turn around an upload, etc..   Might be able to do that with cPanel ... do know for a fact one can do command line that way.

Copy all course id directories in a moodle19 data directory to the 3.4 file system repo ... 19files ... then take your time.   Don't have to worry or tinker too much with Easy Apache 4 or whatever ... even shut down the 1.9 instance if you want and concentrate efforts on getting files from the file system repo into the 3.4 version.  Update/upgrade whatever for the 3.4 and forget the 1.9.

'spirit of sharing', Ken


In reply to Robert Felix

Re: Backward compatibility question preparing for Moodle 3.4

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Correct, Bob.  Moving your Moodle 1.9 to a different place makes the most sense.  If you do a good job managing your own computer (PC or Mac) it might be a good time to learn how to install MAMP, WAMP, XAMPP, or one of these products on your computer.  Then, backup 1.9 from your server and migrate it to your local computer.  This is a good learning experience, especially if you plan to migrate your 3.0 to a new 3.4 server.

In reply to Rick Jerz

Re: Backward compatibility question preparing for Moodle 3.4

by Robert Felix -

Rick, I was looking at the available profiles in the screen shot of EasyApache4, and I see that the all PHP options + OpCache includes PHP 7.0, 5.5 and 5.6.  Does that mean that all are operational or available at the same time on the same domain? Just wondering if that would make it possible for Moodle 3.4 and 2.8 and 1.9 to all continue to function on that domain.

-Bob

In reply to Robert Felix

Re: Backward compatibility question preparing for Moodle 3.4

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Yes, with EasyApache4, it makes it easy to "load" different versions of php.  It then gets a little more complicated to actually use different php versions on your server, but it can be done.

Just last November and December, I did a lot of this kind of experimenting, so I gained a little experience.  It does work, but I decided to not do this because it seemed to be a little too much "overhead" for my production server just to be able to run my old 1.9 and 2.9 moodles, especially when I can run my archived moodles from my Mac.  I like to keep my production server as clean as possible.

In reply to Robert Felix

Re: Backward compatibility question preparing for Moodle 3.4

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Robert, you have included a lot of things in your post, but I will try to help.

You haven't told us much about your server, but my guess is that you might have a VPS, right?

Before you do anything, make sure that you have backups of your MySQL database, and your moodledata folders.  Copy these backups to a local hard disk, just in case you clobber your server doing your updates.

EasyApache4 caught me by a little surprise, initially.  Then I worked with it, experimentally, and got the hang of it. Yes, 4 is probably better than 3, meaning an improvement.

In EasyApache4 you get to choose which versions of php you want to include.  I did experiment with running both php 5.6 and 7.1, but then decided to keep my new server clean and not include 5.6.  I have my old Moodle 1.9 backup running on a local MAMP install.  If you do decide to run multiple php versions, you should be able to find a tools that let's you point different "users", or domains, to different versions of php.  So in theory, you should be okay, but you will need to know what you are doing.  You don't necessarily need a domain name for 1.9, unless you want the world to have easy access to it.  It could be just another "user" on your VPS, that you get to as http://[IP Address]/~username.

I upgraded to Barracuda somewhere along the way, and it could have been back before Moodle 2.8.  Can't remember.  This is done differently, in my.cnf, instead of with EasyApache4.

Here's a suggestion.  Might you be able to buy a one-month new server at a reasonable cost, do all of these experimenting to make sure you know what you are doing, before you do your upgrades on your production server?

In reply to Rick Jerz

Re: Backward compatibility question preparing for Moodle 3.4

by Robert Felix -

Hi Rick,

That's correct, I have a VPS, and have made sure I have backups of everything. So far I have upgraded to Moodle 3.0.10 and everything looks good.

I wasn't aware of what my support rep was suggesting with the EasyApache4 update, but now I see that's just for managing PHP and WHM services.  I won't be able to upgrade PHP to version 7 without that, so it looks like a reasonable thing to do. Fortunately my VPS support is excellent, so I won't be winging it on my own.

Interesting that you also have an old 1.9 backup still running - are you using PHP 7.x for that?

Support suggested something similar - perhaps running 3.4 on a separate domain. One other question - since Google is discontinuing reCaptcha V1 on March 18th, and this is essential for using email-based registration, is there a solution that will work with Moodle 3.0?

That would give me more time to experiment before jumping in with both feet.

Thanks for the assist!

Bob


In reply to Robert Felix

Re: Backward compatibility question preparing for Moodle 3.4

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

No, Moodle 1.9 won't run with php7.  5.6 yes.

If you decide to try from scratch with a new server, then you are into "migrating" your moodle.  I suggest that you match your new server's moodle to your old first, then upgrade Moodle on your new.  (If I have just confused you, let me know.)

In reply to Rick Jerz

Re: Backward compatibility question preparing for Moodle 3.4

by Robert Felix -

Okay, that makes sense. How are you planning to deal with Google's discontinuation of reCaptcha v1?  Is there a solution for Moodle 3.x?

- Bob

In reply to Robert Felix

Re: Backward compatibility question preparing for Moodle 3.4

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Somewhere I think that I saw something about ReCaptcha version 2.  I might be running this, but not sure right now.

In reply to Rick Jerz

Re: Backward compatibility question preparing for Moodle 3.4

by Robert Felix -

Hey Rick and Ken, I realize I haven't asked the million dollar question - will Moodle 1.9 and 2.8 have any problems with PHP 7.x?

Thanks!
Bob

In reply to Robert Felix

Re: Backward compatibility question preparing for Moodle 3.4

by Ken Task -
Picture of Particularly helpful Moodlers

Can't run any version of Moodle using 7.0.x below 3.0.highest ... that I know from first hand experience trying to migrate servers that had been ignored for years.

So there's the Billion $$$ answer ... for free! ;)

'spirit of sharing', Ken

In reply to Ken Task

Re: Backward compatibility question preparing for Moodle 3.4

by Robert Felix -

Got it, and glad I asked! Interesting to see a major change like that in an incremental version update...

So it seems I can have version 3.3 running on with the same server setup as my archive 1.9 install, and that may get me by until I can do some more experimenting and move my 1.9 offline (or as you say, export the data and delete it).

At least I'll be on a supported version...
Thanks again for your assistance!
Bob

In reply to Robert Felix

Re: Backward compatibility question preparing for Moodle 3.4

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Yes Bob.  I had moodle 3.3, moodle 2.9, and moodle 1.9 all running from my same server.

This will get you by for awhile.

Then you can start experimenting with a new server that runs php 7, moodle 3.4, (and EasyApache4).

As another option, you can consider experimenting with installing one of the MAMP/WAMP/XAMPP versions that contains php7, and then install 3.4 just to get used to it.

In reply to Rick Jerz

Re: Backward compatibility question preparing for Moodle 3.4

by Robert Felix -

Thanks Ken and Rick, looks like I have a solid game plan going forward.

Appreciate the assist!
Bob