This is a fresh install of Osticket 1.8.1:
I cannot log into "scp/login.php" unless I manually TRUNCATE the ost_session table from PhPMyAdmin and even then the session is rather short, it only allows me a few minutes before it asks me to log in again. It doesn't even check the login credentials, whatever I enter in the username/password boxes, it just loops back to login.php with an "Authentication Required" message.
The system logs dashboard is full of "Invalid CSRF Token CSRFToken" messages but that doesn't help me at all. The only thing I can think about is that my website is behind Cloudflare and that somehow messes with the authentication but I am not knowledgeable enough to make heads or tails of it. It doesn't seem to affect any other authentication like from my PhPBB forums or whatever, they all work fine.
I have already searched these forums and while there are many other similar issues to this one, none of them provides a working solution. I had the same issue on an old "Osticket 1.6 ST" install but I've decided to scrap that one as it was too old and replace it with the latest version. Back then I solved this issue by manually editing "login.php" and adding this line right after "session_start();":
session_start();
setcookie(session_name(), session_id(), NULL, NULL, NULL, 0);
This workaround is no longer working. Can anyone provide some helpful insight as to what I can do to root out the cause of this annoying issue?