Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

The CSRF token could not be verified

  • Ellen53
  • Ellen53's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 7 months ago #203806 by Ellen53
The CSRF token could not be verified was created by Ellen53
I finished my survey in concept a few people tested it out. The survey consists of 44 questions, divided in groups. De respondents are randomly divided in 3 groups two groups receive a practice at the end of the questionary which they can download.
A few people who tested can completely fill in the questionary, but others receive, after clicking on the 'next' button the next error message:

'Bad Request; The CSRF token could not be verified; The request coult not be understood by the surver due to malformed syntax. Please do not repeat the request without modifications. If you think this is a server error, please contact the webmaster'

After this message they cannot continue. They cannot fill in the questionairy again after this because they are already registerd so I lose these participants.

I was looking on this forum for a solution, I saw that more people had this problem, the answers are very complex and diverse. Is there a relative simple solution for this problem?

Thanx for your time and answer.


Ellen van Breemen
The topic has been locked.
More
3 years 7 months ago #203810 by jelo
Replied by jelo on topic The CSRF token could not be verified

Ellen53 wrote: Is there a relative simple solution for this problem?

No.
The error message is not triggered by one certain root cause.
The topic is "Yii 1.1 CSRF token validation" and you will find many different user stories.

What php version is used? What LimeSurvey version is used?

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • Ellen53
  • Ellen53's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 7 months ago #203848 by Ellen53
Replied by Ellen53 on topic The CSRF token could not be verified
thanks for your reply:
The limesurvey version is 2.06
I cannot find the php version, where can I find that info
The topic has been locked.
More
3 years 7 months ago #203884 by jelo
Replied by jelo on topic The CSRF token could not be verified
With LimeSurvey 2.06 you will run into issues these days. It's no longer supported and you will find it harder to run LS 2.06 with newer PHP versions.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 7 months ago - 3 years 7 months ago #203891 by holch
Replied by holch on topic The CSRF token could not be verified

The limesurvey version is 2.06


The problem is likely with your "Windows 95". ;-)

Jokes aside: 2.06 is from 2016 or something. So your software has not received any updates and bug fixes for about 4 years. The software is also not supported for a couple of years now. You should really think about doing an update to the latest LS 3.x LTS (NOT LS 4.x!!!).

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Last edit: 3 years 7 months ago by holch.
The following user(s) said Thank You: cdorin
The topic has been locked.
More
2 years 8 months ago #217778 by pathros
Replied by pathros on topic The CSRF token could not be verified
Man, I still get that error in version 5.0.3

Is it because the form has been opened without typing anything for a long time? If so, is there a way to increase the inactivity time?
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 8 months ago #217783 by holch
Replied by holch on topic The CSRF token could not be verified

Is it because the form has been opened without typing anything for a long time? If so, is there a way to increase the inactivity time?


Could be. The "inactivity time" is called session time out and is part of the settings of your server (PHP).

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
More
2 years 8 months ago #217792 by jelo
Replied by jelo on topic The CSRF token could not be verified

Man, I still get that error in version 5.0.3Is it because the form has been opened without typing anything for a long time? If so, is there a way to increase the inactivity time?

The CSRF token issue is usually not cause by session timeout.  The default php session is set to 1440 seconds (24 minutes). You can check the session setting via phpinfo inside LimeSurvey.

In shared hosting environments it makes sense to change the LimeSurvey cookie/session names in config.php to prevent mixup in the session folder and your browser.
But first, you might update to 5.0.7 to check again.
If the issue is still there, try to find out if there is a certain trigger. Sometimes it is clicking a button or a certain link. That is important, cause it's not always a server issue. Sometimes the php code has a glitch.






 

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose