Stunts Forum

ZakStunts - the Competition => Competition and Website => Topic started by: dreadnaut on July 20, 2022, 08:16:13 PM

Title: Server upgrade 2022 (stuff might break)
Post by: dreadnaut on July 20, 2022, 08:16:13 PM
Eight years after the last one (http://forum.stunts.hu/index.php?topic=3036.0), we're about to bump the versions of a few pieces of stunts.hu: PHP, MySQL, SimpleMachineForum, WikiMedia. This will give us safer everything (including HTTPS, I hope, which means no more browser warnings), and updated software.

I have tested ZakStunts and Forum locally and those should be OK. I have not done it with the Wiki, I lack experience and time to investigate — maybe Afullo could give us a hand here?

I'm making copies of all things of course — the database is backed up every day!
Title: Re: Server upgrade 2022 (stuff might break)
Post by: Daniel3D on July 21, 2022, 09:12:16 PM
HTTPS would also mean safe single sign-on possibilities.  8)
You are probably upgrading everything in your spare time but do you have a timeframe in which downtime can happen?
This community has been my lifeline for the past few years. So I get nervous when I can't access it 😜
Title: Re: Server upgrade 2022 (stuff might break)
Post by: afullo on July 21, 2022, 09:58:01 PM
I'm not a MW expert, but I have some references. Probably with the details of the case...
Title: Re: Server upgrade 2022 (stuff might break)
Post by: dreadnaut on July 21, 2022, 10:24:36 PM
Quote from: Daniel3D on July 21, 2022, 09:12:16 PM
You are probably upgrading everything in your spare time but do you have a timeframe in which downtime can happen?

The backend upgrade is out of my hands and "queued" for early next week. We'll know the precise time then. Having kept ZakStunts up to date over the years, it'll be OK. I have tested the forum upgrade locally, and that also went well. I'm relatively confident :)

Quote from: afullo on July 21, 2022, 09:58:01 PM
I'm not a MW expert, but I have some references. Probably with the details of the case...

We are starting from MediaWiki 1.18, and going as far as we can on MySQL and PHP, likely 8 and 8 for both. I think I need to step-upgrade to MediaWiki 1.27 then 1.35, but not certain.
Title: Re: Server upgrade 2022 (stuff might break)
Post by: Daniel3D on July 21, 2022, 10:50:08 PM
You don't have to step update mediawiki.
The only thing they mention is.
Quote
If you are upgrading from MediaWiki 1.5 or newer to 1.35, you can upgrade in one step, from your old version to the latest stable version.

Note that if you're upgrading a MediaWiki older than version 1.24, you should manually enable the skins in the LocalSettings.php file. In MediaWiki versions older than 1.24 the skins are enabled automatically, while in newer versions they have to be enabled manually. ....

(Sorry. Got curious and googled it)
Title: Re: Server upgrade 2022 (stuff might break)
Post by: afullo on July 21, 2022, 10:57:46 PM
Quote from: dreadnaut on July 21, 2022, 10:24:36 PM
We are starting from MediaWiki 1.18, and going as far as we can on MySQL and PHP, likely 8 and 8 for both. I think I need to step-upgrade to MediaWiki 1.27 then 1.35, but not certain.

Ok, I just asked. I cannot assure an answer, but it is worth the try.
Title: Re: Server upgrade 2022 (stuff might break)
Post by: Cas on July 22, 2022, 12:08:22 AM
All the best for this upgrade!  Hope it all works perfectly. I really don't know... well, anything... about the different versions of these things. Only little detail I can think of is that https is not supported by Bliss at this time, so ZakStunts would become inaccessible from it until I upgrade it. I have never done https in anything I've written, but I did have the intention to research at one point. I was busy with something else so in the end, I didn't do anything. I guess it'll be time for me to take a look at it again.
Title: Re: Server upgrade 2022 (stuff might break)
Post by: Daniel3D on July 22, 2022, 08:38:18 AM
That's ok CAS. HTTPS is fairly new, no need to hurry, right? 8)
Title: Re: Server upgrade 2022 (stuff might break)
Post by: dreadnaut on July 22, 2022, 09:59:56 AM
Quote from: Cas on July 22, 2022, 12:08:22 AMOnly little detail I can think of is that https is not supported by Bliss at this time, so ZakStunts would become inaccessible from it until I upgrade it.

HTTPS-enabled should not mean HTTPS-only, unless the hosting locks it that way for some reason. That said, I really hope you won't reimplement the protocol yourself, at least this time :o
Title: Re: Server upgrade 2022 (stuff might break)
Post by: afullo on July 22, 2022, 06:03:16 PM
First of all, launching ./maintenance/update.php could result in an error like "Main slot or revision (number) not found", since 1.18 is quite an old version. In the case, try to launch ./maintenance/populateContentTables.php.

Then, this (https://t.me/aiutomediawiki) Telegram group is devoted to help with MW.
Title: Re: Server upgrade 2022 (stuff might break)
Post by: dreadnaut on July 22, 2022, 08:43:08 PM
Thank you, I'll dig further
Title: Re: Server upgrade 2022 (stuff might break)
Post by: Cas on July 23, 2022, 02:54:14 AM
Oh, well, if there is the http way, I can use it, but even if it is only https, I totally see all the good about it, so I don't complain at all. I'm just thinking I'll have to do my work on Bliss. Currently, Bliss gets the track information from the json file you pointed me to and that works perfectly. Only the scoreboard information cannot be retrieved from there so I'm parsing the html to get that, which is not perfect, but I'm willing to use another file if possible.

The matter is actually about the https tunnel. There's no way I can implement it myself without years of learning about low level networking. This forces me to using third-party software to get to the https, which, as you know, I'm always very reluctant to do. I didn't like having to include a third-party graphics format library, but I found a way to make it more acceptable: I found a library that can be statically linked, meaning it won't add a dependency. I was forced to include all the source code of that library with the source of Bliss to comply with the GPL and I also added a switch (a define) in the source code so it's possible to compile it without the library, which results in it only supporting TGA and BMP, but it still works.

For https, I would have to do something similar and I have to research on how to achieve that. Of course, this is not a crucial thing anyway. And the source code of Bliss is already a big mess, so at some point, I would like to start over with a version 3, for which I could organise everything in the base. No doubt https is a step forward.
Title: Re: Server upgrade 2022 (stuff might break)
Post by: afullo on July 25, 2022, 09:12:52 AM
Are there critical extensions on our MW, or some substantially modifying it, such as SMW and WB?
Title: Re: Server upgrade 2022 (stuff might break)
Post by: dreadnaut on July 25, 2022, 02:04:35 PM
Quote from: afullo on July 25, 2022, 09:12:52 AM
Are there critical extensions on our MW, or some substantially modifying it, such as SMW and WB?

I don't think we have added anything, should be plain MediaWiki.
Title: Re: Server upgrade 2022 (stuff might break)
Post by: afullo on July 25, 2022, 05:14:49 PM
Ok. Other suggested reference: https://www.mediawiki.org/wiki/Manual:Upgrading#How_do_I_upgrade_from_a_really_old_version?_In_one_step,_or_in_several_steps
Title: Re: Server upgrade 2022 (stuff might break)
Post by: dreadnaut on August 28, 2022, 12:08:52 AM
The server upgrade is happening on Monday 29 August, bringing PHP 8.1 and MySQL 8.

Website, forum and wiki will be down from some time during the morning, until we update things — that's after work for me, so likely in the evening.

Hopefully everything will be back up for Tuesday, and for the start of the next race.
Title: Re: Server upgrade 2022 (stuff might break)
Post by: afullo on September 01, 2022, 07:50:00 PM
Yay I got first post! :D

Nice mobile interface, the old version didn't have one as far as I knew...
Title: Re: Server upgrade 2022 (stuff might break)
Post by: dreadnaut on September 01, 2022, 07:57:57 PM
Yes, we have gone up several SMF versions with this! We'll see in the coming days if there's anything to fix, or any mod to install — for example, are the dark themes working?

Regarding the server in general, we are stuck on HTTPS-only. This will be a problem for old computers and even some phones :(  Bliss will also fail to retrieve information, I think. Nothing we can change about this, bar the whole hosting company ::)

The new FTP is also very, very slow. The Wiki update is going to be tricky, so I'm going to try the whole thing locally first. Except the wiki to be down for a few days longer, sorry.

Title: Re: Server upgrade 2022 (stuff might break)
Post by: Cas on September 01, 2022, 10:06:28 PM
Hi!  I'm glad to see the forum back up!  I hadn't read this post before I created another one about the theme, so now I'll post here as well.

I was using a dark theme on the other forum. Now upon logging in here it's back to the light theme. I checked to see if there was another one installed and no, but I think this must be pretty easy to do later on once everything is working well. No hurry, but if it's possible, it'll be appreciated.

As regards https and Bliss, yes, for the moment, the migration to https has broken access from Bliss to all tournaments (since Race For Kicks and therefore CCC have also migrated), but I'll take care of this. What I think I will do is simply have Bliss rely on curl to retrieve information from the sites. Incorporating another library would bloat the source code, since I initially wrote it to be lightweight and is now very bulky. To have it carry more features, it would have to be rewritten with a more flexible structure. I'll leave that for Bliss 3 :p. Curl will do the trick for now. All in all, I think the migration to https was an important pending thing to do for a long time both here and in R4K and it was the right way.
Title: Re: Server upgrade 2022 (stuff might break)
Post by: alanrotoi on September 02, 2022, 03:58:07 PM
Are attachments disabled in the forum?
Title: Re: Server upgrade 2022 (stuff might break)
Post by: Daniel3D on September 02, 2022, 04:18:11 PM
Quote from: alanrotoi on September 02, 2022, 03:58:07 PMAre attachments disabled in the forum?
No, they are not available in a quick reply. But if you use the normal reply button below the post it is available.

But there's an error.

Screenshot_20220902-161909.png There was a problem during the uploading of Screenshot_20220902-161909.png.
The upload directory is full. Please contact an administrator about this problem. 0.2 MB
Title: Re: Server upgrade 2022 (stuff might break)
Post by: dreadnaut on September 03, 2022, 12:25:28 AM
Should also be fixed!
Title: Re: Server upgrade 2022 (stuff might break)
Post by: alanrotoi on September 03, 2022, 03:03:13 PM
Thank you! What a work! Your effort is a pillar for the community. :)
Title: Re: Server upgrade 2022 (stuff might break)
Post by: Cas on September 03, 2022, 08:39:33 PM
It really is a pleasure to write in the new forum. It feels a lot more responsive and sharp!
Title: Re: Server upgrade 2022 (stuff might break)
Post by: dreadnaut on September 04, 2022, 01:45:29 AM
I think I've managed the wiki upgrade as well!  I'll leave to those who use it regularly to check if everything is working as expected ::)
Title: Re: Server upgrade 2022 (stuff might break)
Post by: afullo on September 04, 2022, 02:16:03 PM
As I just said in the shoutbox, I only guess we have still to restrict edit access again, since various spam emerged in the very first hours after the restore...

I just checked also how "r acers" correctly converts into "pipsqueaks".
Title: Re: Server upgrade 2022 (stuff might break)
Post by: dreadnaut on September 04, 2022, 04:18:13 PM
Quote from: afullo on September 04, 2022, 02:16:03 PMAs I just said in the shoutbox, I only guess we have still to restrict edit access again, since various spam emerged in the very first hours after the restore...

Permissions tightened, and spam cleaned up 🧹
Title: Re: Server upgrade 2022 (stuff might break)
Post by: dreadnaut on September 04, 2022, 04:49:49 PM
More on the Wiki:

- I've removed all the blocked users and most of their data, so we are back at 20-30 actual humans registered; this should make things easier to track

- The old wiki had a "Looping Warriors" namespace; I couldn't find any pages in it, but that might be me not knowing how it works. It's currently disabled, but I think I know how to turn it on again.  @CTG @Akoss Poo, do you remember how that works? Can you still log in?
Title: Re: Server upgrade 2022 (stuff might break)
Post by: Cas on September 04, 2022, 08:20:36 PM
I've tried the Wiki. It has a very good look, much nicer than the older version. I tried my user and it all works perfectly. I see it has a lot of features and configuration for the user, which makes me wonder if here is also possible to set up a dark theme. Anyway, it's great.
Title: Re: Server upgrade 2022 (stuff might break)
Post by: Shoegazing Leo on September 07, 2022, 04:30:53 AM
Wow.... it's so different and with more resources (I'm very busy these days working in Census).
Title: Re: Server upgrade 2022 (stuff might break)
Post by: dreadnaut on September 10, 2022, 12:26:55 AM
I've sort of fixed the forum chat as well, but it'll need some testing. The code has been abandoned, and it took some poking and prodding to make it work in PHP8 :D
Title: Re: Server upgrade 2022 (stuff might break)
Post by: Cas on September 10, 2022, 04:01:55 AM
Hey, if that would not work very well, may I suggest IRC?  I mean, an IRC server with a web client. I don't even know if a good one exists, ha, ha. But that would allow to also use local clients and I guess there will always be another IRC client. Anyway, I'm going to be testing the chat!

EDIT: Trying the chat, I found a small bug. If you log in to the forum and then you go to the chat, everything works fine, but if you are not logged into the forum and you attempt to log in directly to the chat, it fails saying that your login time has expired for the forum.
Title: Re: Server upgrade 2022 (stuff might break)
Post by: Duplode on September 25, 2022, 09:04:21 PM
Finally spending some time here on forum after the upgrade -- it all looks great; thanks dreadnaut!

Quote from: Daniel3D on September 02, 2022, 04:18:11 PM
Quote from: alanrotoi on September 02, 2022, 03:58:07 PMAre attachments disabled in the forum?
No, they are not available in a quick reply. But if you use the normal reply button below the post it is available.

Thanks for pointing it out; otherwise I think I'd still be looking for the attachment button :D

Quote from: dreadnaut on September 04, 2022, 04:49:49 PMMore on the Wiki:

- I've removed all the blocked users and most of their data, so we are back at 20-30 actual humans registered; this should make things easier to track

Excellent!

Quote from: dreadnaut on September 04, 2022, 04:49:49 PM- The old wiki had a "Looping Warriors" namespace; I couldn't find any pages in it, but that might be me not knowing how it works. It's currently disabled, but I think I know how to turn it on again.  @CTG @Akoss Poo, do you remember how that works? Can you still log in?

I set that up a while ago, when CTG asked for a team area (https://forum.stunts.hu/index.php?msg=76174). The idea was that pages in the Looping Warriors namespace would only be editable by users in the looping-warriors group.