Welcome to the LimeSurvey Community Forum

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

CSRF token error when executing install script

  • Bakuriu
  • Bakuriu's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 6 months ago #220894 by Bakuriu
Hi I'm new to limesurvey. I'm trying to install Limesruvey CE on a linux VPS I own. My target is to install it with the following settings:

* Webserver:  nginx
* DB: Postgres
* PHP: 7.4

I have:
* Installed PHP7.4 & PHP7.4-fpm
* Installed nginx 
* Installed Postgres
* I have downloaded the limesurvey ce edition and unpacked it under /var/www/limesurvey   (i.e. I have /var/www/limesurvey/index.php and /var/www/limesurvey/admin directory etc.)
* I have added a configuration to my nginx under sites-available as follows:
Code:
# file is /etc/nginx/sites-available/surveys.example.com
server {
   listen 80;
   listen [::]:80;
 
   server_name surveys.example.com;
   root /var/www/limesurvey/;
 
   index index.php;
 
   location / {
       try_files $uri $uri/ /index.php?$args;
   }
 
   location ~ \.php$ {
       include snippets/fastcgi-php.conf;
       fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
   }
}

Accessing surveys.example.com/admin I am shown the starting page:
[img

When clicking on "Start installation" I get a Bad request - "The CSRF token could not be verified." error:
[img
Does anyone know what might be the problem?

I have tried to search the forum but the only CSRF issues I have found are not related to the installation process.

Let me know if more information would be required.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 6 months ago #220899 by DenisChenu
Replied by DenisChenu on topic CSRF token error when executing install script
Seems session didn't start ?
Can you look at your browser console (storage tab) ?

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • Bakuriu
  • Bakuriu's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 6 months ago #220908 by Bakuriu
Wow, thank you. Looking at that I saw that Chrome was not saving anything in the local storage. I tried using Firefox and it was working fine...

Then it occurred to me that Chrome might have limited usage of the local storage APIs etc to HTTPS websites (and I was currently using plain HTTP). Modifying the nginx configuration to server the installation as HTTPS works.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose