5

My osTicket Version 1.10 is installed in PLESK Windows Server. I have tried to install XAMPP on the PLESK Windows Server but not able to start XAMPP .

Soon I get error after login to osTicket "Valid CSRF Token Required in Osticket After login" which was earlier working fine

After login I get this error:

enter image description here

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Amit Kandwal
  • 59
  • 1
  • 1
  • 3

8 Answers8

9

in include/class.ostsession.php

Just add this line:

$this->data->session_data = "";

After:

catch (DoesNotExist $e) {
        $this->data = new SessionData(['session_id' => $id]);

So it will be:

catch (DoesNotExist $e) {
        $this->data = new SessionData(['session_id' => $id]);
        $this->data->session_data = "";

Then try to login from scratch, don't just refresh the submission.

CairoCoder
  • 3,091
  • 11
  • 46
  • 68
2

My configuration

  • Win 2012 R2 Standard (64bit)
  • PHP 7.1.7 64bit (installed by Web Platform Installer)
  • MySql 14.14 Distrib 5.7.20 (installed by MySql Installer Community Edition)
  • osticket 1.10 (on IIS)

I had the same problem: "Valid CSRF Token Required..."

Here is where I found the fix: https://github.com/osTicket/osTicket/commit/424bfc99d93b920f6162b602eeea41125086425d

And here is a conversation about the problem: https://github.com/osTicket/osTicket/issues/3546

Teo Bebekis
  • 625
  • 8
  • 9
1

I had the same problem. MySQL table 'ost_session' was broken. Run this command in MySQL: REPAIR TABLE ost_session

Miroslav Adamec
  • 1,060
  • 1
  • 15
  • 23
  • Check your logs table in mysql (table name is ost_syslog I think). You should find a reason there. My log contains detailed info about SQL error with this line in it: 'Table './osticketdb/ost_session' is marked as crashed and should be repaired'. It hapened me three times over 16 months I am using Osticket. – Miroslav Adamec Feb 09 '17 at 14:01
  • For me this issue was resolved after downgrading the PHP version. Now I am using 5.6 and this issue is no more poping up. P.S. I was using PHP 7.1.1 before. – Yoosuf Mo Feb 10 '17 at 17:26
  • Had the same issue. – Srinivasan Sekar Jun 28 '19 at 05:52
0

I had the same problem with PHP 7.1.1, then I changed to 7.0.15 and it worked

Marcos
  • 1
  • Hello, please add some explanation to your answer so it has more detail and easier to understand/follow. – Chait Mar 28 '17 at 22:01
0

I received this error after installing OST 1.10 on Windows Server 2012 with IIS 7 using PHP Manager for IIS. (http://osticket.com/wiki/Installation#Windows_Recommended_Links) Accorinding to "To install osTicket, your web server must have PHP 5.3 (or better)" I installed "the latest PHP version" in my case 7.1.1. With PHP 7.1.1 I could not login into the SCP. After changing the PHP Version from 7.1.1 to 5.4.45 everything works fine.

söhr
  • 1
0

Its because of varnish cache login credentials.

Test directly with web server host entries. It will work.

sandesh
  • 79
  • 1
  • 2
0

I might be late, but what worked for me was to use another browser on my computer or clearing the cache

C Williams
  • 850
  • 12
  • 19
0

Login to you server using ssh(ssh username@ip) and then check if in your Apache/Centos config file following setting is enabled using the below command

For Centos - nano /etc/httpd/conf/httpd.conf
For Apache - nano /etc/apache2/apache2.conf

Then replace

Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure

with

#Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure

At last restart the web server.

Matt
  • 1,518
  • 4
  • 16
  • 30
Javaid Mir
  • 41
  • 1
  • 6