LimeSurvey version: LimeSurvey Cloud /// Version 5.3.29
LimeSurvey hosting, well cloud
Survey theme/template: vanilla
/// admin theme: bay of many
==================
Hail to you Limesurvey champions !
I am working for the ASC, striving for sustainable and responsible Aquaculture around the world.
Briefly the problem is I am trying to find
config.php on our Limesurvey Cloud, but I do not know even where to look for it or if there is one for our version.
Explanation below:
I am a data engineer and work mainly with Python and SQL, never heard of Limesurvey before, therefore I am sorry if my question is silly.
We are trying to embed one of our surveys in our WordPress website.
I added the survey link to in iFrame and used it to embed in the site with the custom HTML block, it worked but nothing was displayed.
Then I found that setting in Global settings and enabled embedding, which enabled the survey to load its starting page on our website.
BUT when I press Next to start filling the survey, here is what comes in
bang on
>>>
400: Bad RequestThe CSRF token could not be verified.The request could not be understood by the server due to malformed syntax. Please do not repeat the request without modifications.
>>>
So I did a bit of googling for that CSRF token and found out that we need to add some code inside config.php
Here is the article which explains it
manual.limesurvey.org/Optional_settings#....28New_in_3.24.3_.29
Allow session start in iframeThe session need to be secure (valid https) , httponly and samesite to None. All settings must be sent all lowercase.'session' => array (
'sessionName'=>'LS-VBXZZORFJZCAKGYI',
// Uncomment the following lines if you need table-based sessions.
// Note: Table-based sessions are currently not supported on MSSQL server.
// 'class' => 'application.core.web.DbHttpSession',
// 'connectionID' => 'db',
// 'sessionTableName' => '{{sessions}}',
'cookieParams' => array(
'secure' => true,
'httponly' => true,
'samesite' => 'None',
),
),
Allow csrf cookie in iframeSame than session: must be secure and samesite to None. Whole array must be added at same level than session
'request' => array(
'enableCsrfValidation'=>true,
'csrfCookie' => array(
'sameSite' => 'None',
'secure' => true,
),
),
The problem is that I cannot find this config.php file anywhere, honestly I do not even know where to look.
Please can you help?