osticket Valid CSRF Token Required

Avatar
  • Answered
New install of OS ticket using the cpanel software installer, when you try to login, you get the following error message

osticket Valid CSRF Token Required

Have looked this up, its related to the PH version, apparently OSTicket does not fully support anything above 5.6 yet, so 2 options. Change the PHP version down to 5.6 or do the following edit

In file class.ostsession.php and insert this line at 193 row
$this->data->session_data = "";

After the edition
191 catch (DoesNotExist $e) {
192 $this->data = new SessionData(['session_id' => $id]);
193 $this->data->session_data = "";

Not sure why nobody at inmotion has picked up on this, it seems that anyone using their software installer is going to run into this
Avatar
IMH Support Agent 5
Hello shimsim, Thanks for your comment about installing osTicket. Did the code edit fix the error? We would be interested to know because, as I'm sure you've concluded, downgrading PHP would probably not be the optimal solution. If the code edit didn't fix the error, you may want to consider taking some time with our Managed Hosting team. The problem you've described, however, seems to blur the line between system administration (which we can help with) and code support (with which we're limited). Best, Christopher M.