I have just migrated our forum over to a new server.

Whenever a user logs in or trys to post, they get the error: Unable to confirm security token.

I see CSRF can be disabled, but ideally we would like to fix the issue and not just disable it.

Can you suggest what I need to do to investigate and fix it?

Turns out the upgrade loop was due to cached pages in the cache folder, clearing the cache folder did the job.

Yep that sorted it thanks, and it says it upgraded the db, but now im stuck in a loop where I try and browse to the forum and i still hit the page telling me to upgrade the db, so I go to do that and it says its already upgraded

I am using MySQL 8.0.15

When I try to run db_update.php, I get the following error:

Database reported: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'groups ADD g_moderator TINYINT(1) NOT NULL DEFAULT 0 AFTER g_user_title' at line 1 (Errno: 1064).

Failed query: ALTER TABLE groups ADD g_moderator TINYINT(1) NOT NULL DEFAULT 0 AFTER g_user_title

The error occurred on line 374 in C:\WebSite\Forum2\include\dblayer\mysqli.php

Is this because PunBB cannot be used with MySQL 8.0.15?