View Issue Details

This bug affects 2 person(s).
 18
IDProjectCategoryView StatusLast Update
18368Bug reportsStatisticspublic2023-07-17 10:07
Reportergiorgi Assigned Totibor.pacalat  
PrioritynormalSeveritytweak 
Status closedResolutionfixed 
Product Version5.4.x 
Summary18368: export_statistics from API Yields error
Description

Request error: "Property \"Response_666271.666271X61X31523802\" is not defined."

question is Array (Type: F)

Steps To Reproduce

Steps to reproduce

$myJSONRPCClient = new \org\jsonrpcphp\JsonRPCClient( static::$LS_BASEURL.'/admin/remotecontrol' );
$sSessionKey= $myJSONRPCClient->get_session_key( static::$LS_USER, static::$LS_PASSWORD );
$aAttributes = true;

$results=$myJSONRPCClient->export_statistics($sSessionKey,$iSurveyID,$docType='pdf');

    $myJSONRPCClient->release_session_key( $sSessionKey );

    dd($results);

Expected result

(Write here what you expected to happen)

Actual result

(Write here what happened instead)

TagsNo tags attached.
Bug heat18
Complete LimeSurvey version number (& build)5.4.2+220921
I will donate to the project if issue is resolvedNo
Browser
Database type & versionmysql 10.5
Server OS (if known)
Webserver software & version (if known)
PHP Version7.3.33

Relationships

duplicate of 18814 closedtibor.pacalat Array question statistics fail for Remote Control 

Users monitoring this issue

OliverR

Activities

gabrieljenik

gabrieljenik

2022-09-24 00:01

manager   ~71930

Please upload LSA to reproduce issue

gabrieljenik

gabrieljenik

2023-01-19 13:46

manager   ~73498

Hello giorgi,
This ticket has been open for quite some time.
Do you have any new info / feedback?
Can you please check if this issue still exists in the latest version of LimeSurvey and let us know?
Thank you!

OliverR

OliverR

2023-05-23 10:23

reporter   ~75148

Dear All, I'm seeing a similar issue, running a self hosted version 5.6.19+230509 (OS: FreeBSD 13.1-RELEASE / PHP: 7.4.33)

Hopefully giorgi is still around: Do you use any additional plugins for your LS installation? On my installation a plugin called "AuthRemoteToken" is used. (https://gitlab.com/SondagesPro/Authentification/AuthRemoteToken) This plugin provides a button on the admin-GUI to generate credentials for LSRC2 API and an additional LSRC2 URL, because the main LRSC2 URL is protected by Shibboleth Auth, which LSRC2 does not support currently. Maybe that plugin messes with the API call or with the data received after the call resulting in the message "Property ... is not defined". I'll investigate this further.

OliverR

OliverR

2023-05-23 12:18

reporter   ~75153

Okay, I did some further testing: On a testsystem I rolled back to LS Version 5.4.7+221019, this is the version my problematic survey was created with. I disabled Shibboleth Auth (both the Shib-Plugin in LS and the apache config), so that only local DB Auth is available. The problem still persists. I've exported a test survey that also has this problem and attached it here. Thank you in advance for looking into it.

gabrieljenik

gabrieljenik

2023-05-23 15:18

manager   ~75156

Can you please try to reproduce with the latest version and out of the box plugins?
Also, this SGQA which is failing 666271X61X31523802, which question answer is related to?

OliverR

OliverR

2023-05-23 15:51

reporter   ~75165

Thank you for your quick response! There are no more plugins installed on the system, the only other plugins are "shibboleth auth" and the "authremotetoken" and I disabled them this morning. Is is okay if we stick with the latest version 5 for now? I don't want to upgrade to v6 yet because I then cannot jump quickly between the testing and productive system.

The concrete error in my case is the following:
{"id":1,"result":null,"error":"Eigenschaft \"Response_644242.644242X7854X8165181687 ist nicht definiert."}

"Eigenschaft is nicht definiert" means "Property is not defined" in Englisch. The long row of numbers is probably dynamically created on each LS installation upon survey import or creation. The first six numbers represent the local survey id, the following numbers might represent an id of the question group and so on. So one cannot take these numbers literally.

Do you have the possibility to import my provided lsa-package and check, if the error appears there also?

In the mean time I have tried another json rpc client, which also results in the same error...

Thank you for your response once again!

gabrieljenik

gabrieljenik

2023-05-23 15:59

manager   ~75168

There are no more plugins installed on the system, the only other plugins are "shibboleth auth" and the "authremotetoken" and I disabled them this morning.

OK

Is is okay if we stick with the latest version 5 for now?

Sure

In the mean time I have tried another json rpc client, which also results in the same error

So issue still happens on latest v5, right?

If so, will review and let you know.

Thanks

gabrieljenik

gabrieljenik

2023-05-23 16:00

manager   ~75169

I think this is a duplicate of 18814
Please, can you try this fix?

https://github.com/LimeSurvey/LimeSurvey/commit/3fb81e51289b6ce90cd2d3749bcc62b2bbf699b5

OliverR

OliverR

2023-05-23 16:29

reporter   ~75177

That you very much again! I tried 5.6.19 today, my webserver admin will install the lastest 5.6.22 tomorrow. I'll try with this release again, if the issue persists, we'll try to apply this fix from github.

I'll come back to you tomorrow. Best regads!

OliverR

OliverR

2023-05-24 13:42

reporter   ~75213

After upgrading to 5.6.22+230523 (disabled all third party plugins) the error vanishes, so my guess is, that the fix from the linked github commit did something. Unfortunately the LSRC2 function "export_statistics" now delivers an empty result, without an error message.

Mainly I use webhofers JSON-RPC PHP (https://github.com/weberhofer/jsonrpcphp) for fetching data from LSRC2, but the issue is the same for "Tabbed Postman - REST Client" Chrome Plugin (https://chrome.google.com/webstore/detail/tabbed-postman-rest-clien/coohjcphdfgbiolnekdpbcijmhambjff):

This is the debug output from webhofers JSON-RPC PHP:

Request
{"method":"get_session_key","params":["user","MyStrongPassword"],"id":1}
Response
{"id":1,"result":"wCIc7JQ91zD3kKAPN1sm18PrieJHC8zj","error":null}

End of Response
Request
{"method":"list_surveys","params":["wCIc7JQ91zD3kKAPN1sm18PrieJHC8zj"],"id":1}
Response
{"id":1,"result":[{"sid":"644242","surveyls_title":"Test-Evaluation","startdate":"2023-03-09 09:24:00","expires":"2023-06-23 16:15:00","active":"Y"},{"sid":"794332","surveyls_title":"Just Another Test Survey","startdate":"2022-06-20 11:05:00","expires":"2022-07-22 23:59:00","active":"Y"}],"error":null}

End of Response
PHP-Output: Start iteration over surverys
PHP-Output: Begin to fetch survey id 644242
Request
{"method":"export_statistics","params":["wCIc7JQ91zD3kKAPN1sm18PrieJHC8zj","644242","xls"],"id":1}
Response
{"id":1,"result":"","error":null}

End of Response

PHP-Output: Begin to fetch survey id 794332
Request
{"method":"export_statistics","params":["wCIc7JQ91zD3kKAPN1sm18PrieJHC8zj","794332","xls"],"id":1}
Response
{"id":1,"result":"","error":null}

End of Response
Request
{"method":"release_session_key","params":["wCIc7JQ91zD3kKAPN1sm18PrieJHC8zj"],"id":1}
Response
{"id":1,"result":"OK","error":null}

End of Response

It would be great if you can check if the "export_statistics" functions works on your side. and delivers back a base64 encoded file.

Thank you very much!

gabrieljenik

gabrieljenik

2023-05-24 14:36

manager   ~75217

Hi OliverR,

On the latest v5 there are automated scripts that test the export_statistics process.
So I am confident it works.

Have you checked the web server logs or php logs?

Still, please, just remove the fix and test again, as to make sure the fix is not creating the problem.
Also, can you set DEBUG=2 on the config.php ?
That way if something is wrong we will be able to see it better.

Also, please, can you test the export_statistics with a simple survey with only a single choice question?

Besides array questions, what other question types does your survey have?
The error we fixed could be spreaded on other question types maybe.

Thanks

OliverR

OliverR

2023-05-26 12:09

reporter   ~75229

Dear gabrieljenik,
sorry for coming back so late. I gathered up with a collegue yesterday, but we were not able to produce any php-errors. Because of that I installed a new test-system in a VM, I used Ubuntu 20.04, because it comes with the same php version 7.4 as our productive LimeSurvey running on FreeBSD. LimeSurvey Version 5.6.23 was installed and used. Inside that VM the export_statistic function of LSRC2 also produces only empty results and no errors were logged, neither to syslog, webserver log or a dedicated php log file. On ubuntu I used the tool "inotifywait" to track filesystem access under /var in order to detect were logs might be written to. By that coincidence I discovered, that the desired xls-files, that should be produced by export_statistic function appear in limesurveys subdirectory "tmp", for instance: /usr/local/www/limesurvey/tmp/statistic-survey337632.xls! So the current state is, at least for php 7.4, that the export_statistic function basically works (xls files are formed properly as far as I can tell), but it does not pass the generated file to the JSON request. Therefore I'll attach a LS trace-log from one of the export_statistics request. My hope is that is helps you to figure out, why the xls file stays in tmp and is not passed along...

I found it really hard to get LS to log anything, so here is my log-setting from config.php , if you need other information, please tell, how to adopt the log settings:
return array(
'components' => array(
...
'log' => array(
'routes' => array(
'allError' => array(
'class' => 'CFileLogRoute',
'logPath'=>'/var/log/limesurvey/',
'logFile'=>'application.log',
'levels' => 'trace, debug, info, error, warning',
'except' => 'exception.CHttpException.404',
'maxFileSize'=>'100000',
),
),
),
...
),
...
'config'=>array(
'debug'=>2,
...
),
...

One more thing: When testing with version LS 5.6.23 i changed "application/helpers/common_helper.php" back and the error "Property ... is not defined." reappeared! (see: https://github.com/LimeSurvey/LimeSurvey/pull/3165/commits/3fb81e51289b6ce90cd2d3749bcc62b2bbf699b5)
So that change really fixed the error. Thank you very much!

export_statistics_LSRC2.log (45,574 bytes)   
2023/05/26 11:26:21 [trace] [system.CModule] Loading "log" application component
2023/05/26 11:26:21 [trace] [system.CModule] Loading "ETwigViewRenderer" application component
2023/05/26 11:26:21 [trace] [system.CModule] Loading "request" application component
2023/05/26 11:26:21 [trace] [system.CModule] Loading "urlManager" application component
2023/05/26 11:26:21 [trace] [system.CModule] Loading "cache" application component
2023/05/26 11:26:21 [trace] [application] Route "admin/remotecontrol passed without CSRF validation
2023/05/26 11:26:21 [trace] [system.CModule] Loading "session" application component
2023/05/26 11:26:21 [trace] [system.CModule] Loading "db" application component
2023/05/26 11:26:21 [trace] [system.db.CDbConnection] Opening DB connection
2023/05/26 11:26:21 [trace] [system.db.CDbCommand] Querying SQL: SHOW FULL COLUMNS FROM `lime_settings_global`
2023/05/26 11:26:21 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `lime_settings_global`
2023/05/26 11:26:21 [trace] [system.db.ar.CActiveRecord] SettingGlobal.findAll()
2023/05/26 11:26:21 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_settings_global` `t`
2023/05/26 11:26:21 [trace] [system.CModule] Loading "assetManager" application component
2023/05/26 11:26:21 [trace] [system.CModule] Loading "bootstrap" application component
2023/05/26 11:26:21 [trace] [system.CModule] Loading "user" application component
2023/05/26 11:26:21 [trace] [system.CModule] Loading "messages" application component
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT `t1`.`message` AS `message`, `t2`.`translation` AS `translation`
FROM `lime_source_message` `t1`, `lime_message` `t2`
WHERE t1.id=t2.id AND t1.category=:category AND t2.language=:language
2023/05/26 11:26:22 [trace] [system.CModule] Loading "clientScript" application component
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW FULL COLUMNS FROM `lime_surveys`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `lime_surveys`
2023/05/26 11:26:22 [trace] [system.CModule] Loading "pluginManager" application component
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] SettingGlobal.find()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_settings_global` `t` WHERE stg_name=:name LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW FULL COLUMNS FROM `lime_plugins`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `lime_plugins`
2023/05/26 11:26:22 [trace] [system.CModule] Loading "sodium" application component
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Plugin.findAllByAttributes()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_plugins` `t` WHERE `t`.`active`=:yp0 ORDER BY priority DESC
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW FULL COLUMNS FROM `lime_failed_login_attempts`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `lime_failed_login_attempts`
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] FailedLoginAttempt.find()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_failed_login_attempts` `t` WHERE number_attempts >= :attempts AND ip = :ip AND is_frontend = :is_frontend LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW FULL COLUMNS FROM `lime_users`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `lime_users`
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] User.findByAttributes()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_users` `t` WHERE `t`.`users_name`=:yp0 LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW FULL COLUMNS FROM `lime_permissions`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `lime_permissions`
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Permission.findByAttributes()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_permissions` `t` WHERE `t`.`entity_id`=:yp0 AND `t`.`entity`=:yp1 AND `t`.`uid`=:yp2 AND `t`.`permission`=:yp3 LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Plugin.findAll()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_plugins` `t`
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Plugin.findByPk()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_plugins` `t` WHERE `t`.`id`=1 LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Plugin.findByPk()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_plugins` `t` WHERE `t`.`id`=2 LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Plugin.findByPk()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_plugins` `t` WHERE `t`.`id`=3 LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Plugin.findByPk()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_plugins` `t` WHERE `t`.`id`=4 LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Plugin.findByPk()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_plugins` `t` WHERE `t`.`id`=8 LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Plugin.findByPk()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_plugins` `t` WHERE `t`.`id`=9 LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Plugin.findByPk()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_plugins` `t` WHERE `t`.`id`=10 LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Plugin.findByPk()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_plugins` `t` WHERE `t`.`id`=5 LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Plugin.findByPk()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_plugins` `t` WHERE `t`.`id`=6 LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Plugin.findByPk()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_plugins` `t` WHERE `t`.`id`=7 LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Plugin.findByPk()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_plugins` `t` WHERE `t`.`id`=11 LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Plugin.findByPk()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_plugins` `t` WHERE `t`.`id`=12 LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Plugin.findByPk()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_plugins` `t` WHERE `t`.`id`=13 LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Plugin.findByPk()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_plugins` `t` WHERE `t`.`id`=14 LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Plugin.findByPk()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_plugins` `t` WHERE `t`.`id`=15 LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Plugin.findByPk()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_plugins` `t` WHERE `t`.`id`=16 LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Plugin.findByPk()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_plugins` `t` WHERE `t`.`id`=17 LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] SettingGlobal.find()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_settings_global` `t` WHERE stg_name=:name LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Plugin.findAllByAttributes()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_plugins` `t` WHERE `t`.`active`=:yp0 ORDER BY priority DESC
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] User.findAll()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_users` `t` WHERE `t`.`users_name`=:ycp0 LIMIT 2
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] User.update()
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] User.updateByPk()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Executing SQL: UPDATE `lime_users` SET `uid`=:yp0, `users_name`=:yp1, `password`=:yp2, `full_name`=:yp3, `parent_id`=:yp4, `email`=:yp5, `htmleditormode`=:yp6, `templateeditormode`=:yp7, `questionselectormode`=:yp8, `one_time_pw`=:yp9, `dateformat`=:yp10, `last_login`=:yp11, `created`=:yp12, `modified`=NOW(), `validation_key`=:yp13, `validation_key_expiration`=:yp14, `last_forgot_email_password`=:yp15, `expires`=:yp16, `lang`=:yp17 WHERE `lime_users`.`uid`=1
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] FailedLoginAttempt.deleteAllByAttributes()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Executing SQL: DELETE FROM `lime_failed_login_attempts` WHERE `lime_failed_login_attempts`.`ip`=:yp0 AND `lime_failed_login_attempts`.`is_frontend`=:yp1
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] User.findByAttributes()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_users` `t` WHERE `t`.`users_name`=:yp0 LIMIT 1
2023/05/26 11:26:22 [trace] [system.CModule] Loading "securityManager" application component
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW FULL COLUMNS FROM `lime_sessions`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `lime_sessions`
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Session.insert()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Executing SQL: INSERT INTO `lime_sessions` (`id`, `expire`, `data`) VALUES (:yp0, :yp1, :yp2)
2023/05/26 11:26:22 [trace] [system.CModule] Loading "log" application component
2023/05/26 11:26:22 [trace] [system.CModule] Loading "ETwigViewRenderer" application component
2023/05/26 11:26:22 [trace] [system.CModule] Loading "request" application component
2023/05/26 11:26:22 [trace] [system.CModule] Loading "urlManager" application component
2023/05/26 11:26:22 [trace] [system.CModule] Loading "cache" application component
2023/05/26 11:26:22 [trace] [application] Route "admin/remotecontrol passed without CSRF validation
2023/05/26 11:26:22 [trace] [system.CModule] Loading "session" application component
2023/05/26 11:26:22 [trace] [system.CModule] Loading "db" application component
2023/05/26 11:26:22 [trace] [system.db.CDbConnection] Opening DB connection
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW FULL COLUMNS FROM `lime_settings_global`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `lime_settings_global`
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] SettingGlobal.findAll()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_settings_global` `t`
2023/05/26 11:26:22 [trace] [system.CModule] Loading "assetManager" application component
2023/05/26 11:26:22 [trace] [system.CModule] Loading "bootstrap" application component
2023/05/26 11:26:22 [trace] [system.CModule] Loading "user" application component
2023/05/26 11:26:22 [trace] [system.CModule] Loading "messages" application component
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT `t1`.`message` AS `message`, `t2`.`translation` AS `translation`
FROM `lime_source_message` `t1`, `lime_message` `t2`
WHERE t1.id=t2.id AND t1.category=:category AND t2.language=:language
2023/05/26 11:26:22 [trace] [system.CModule] Loading "clientScript" application component
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW FULL COLUMNS FROM `lime_surveys`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `lime_surveys`
2023/05/26 11:26:22 [trace] [system.CModule] Loading "pluginManager" application component
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] SettingGlobal.find()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_settings_global` `t` WHERE stg_name=:name LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW FULL COLUMNS FROM `lime_plugins`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `lime_plugins`
2023/05/26 11:26:22 [trace] [system.CModule] Loading "sodium" application component
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Plugin.findAllByAttributes()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_plugins` `t` WHERE `t`.`active`=:yp0 ORDER BY priority DESC
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Session.deleteAll()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW FULL COLUMNS FROM `lime_sessions`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `lime_sessions`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Executing SQL: DELETE FROM `lime_sessions` WHERE expire < 1685093182
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Session.findByPk()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_sessions` `t` WHERE `t`.`id`='6W9RlJT7fWmV01grsmH_GiYkOp_vIURE' LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW FULL COLUMNS FROM `lime_users`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `lime_users`
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] User.findByAttributes()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_users` `t` WHERE `t`.`users_name`=:yp0 LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW FULL COLUMNS FROM `lime_permissions`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `lime_permissions`
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Permission.findByAttributes()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_permissions` `t` WHERE `t`.`entity_id`=:yp0 AND `t`.`entity`=:yp1 AND `t`.`uid`=:yp2 AND `t`.`permission`=:yp3 LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] User.findByPk()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_users` `t` WHERE `t`.`uid`=1 LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Survey.findAll()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW FULL COLUMNS FROM `lime_surveys_languagesettings`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `lime_surveys_languagesettings`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT `t`.`sid` AS `t0_c0`, `t`.`owner_id` AS `t0_c1`, `t`.`gsid` AS `t0_c2`, `t`.`admin` AS `t0_c3`, `t`.`active` AS `t0_c4`, `t`.`expires` AS `t0_c5`, `t`.`startdate` AS `t0_c6`, `t`.`adminemail` AS `t0_c7`, `t`.`anonymized` AS `t0_c8`, `t`.`format` AS `t0_c9`, `t`.`savetimings` AS `t0_c10`, `t`.`template` AS `t0_c11`, `t`.`language` AS `t0_c12`, `t`.`additional_languages` AS `t0_c13`, `t`.`datestamp` AS `t0_c14`, `t`.`usecookie` AS `t0_c15`, `t`.`allowregister` AS `t0_c16`, `t`.`allowsave` AS `t0_c17`, `t`.`autonumber_start` AS `t0_c18`, `t`.`autoredirect` AS `t0_c19`, `t`.`allowprev` AS `t0_c20`, `t`.`printanswers` AS `t0_c21`, `t`.`ipaddr` AS `t0_c22`, `t`.`ipanonymize` AS `t0_c23`, `t`.`refurl` AS `t0_c24`, `t`.`datecreated` AS `t0_c25`, `t`.`showsurveypolicynotice` AS `t0_c26`, `t`.`publicstatistics` AS `t0_c27`, `t`.`publicgraphs` AS `t0_c28`, `t`.`listpublic` AS `t0_c29`, `t`.`htmlemail` AS `t0_c30`, `t`.`sendconfirmation` AS `t0_c31`, `t`.`tokenanswerspersistence` AS `t0_c32`, `t`.`assessments` AS `t0_c33`, `t`.`usecaptcha` AS `t0_c34`, `t`.`usetokens` AS `t0_c35`, `t`.`bounce_email` AS `t0_c36`, `t`.`attributedescriptions` AS `t0_c37`, `t`.`emailresponseto` AS `t0_c38`, `t`.`emailnotificationto` AS `t0_c39`, `t`.`tokenlength` AS `t0_c40`, `t`.`showxquestions` AS `t0_c41`, `t`.`showgroupinfo` AS `t0_c42`, `t`.`shownoanswer` AS `t0_c43`, `t`.`showqnumcode` AS `t0_c44`, `t`.`bouncetime` AS `t0_c45`, `t`.`bounceprocessing` AS `t0_c46`, `t`.`bounceaccounttype` AS `t0_c47`, `t`.`bounceaccounthost` AS `t0_c48`, `t`.`bounceaccountpass` AS `t0_c49`, `t`.`bounceaccountencryption` AS `t0_c50`, `t`.`bounceaccountuser` AS `t0_c51`, `t`.`showwelcome` AS `t0_c52`, `t`.`showprogress` AS `t0_c53`, `t`.`questionindex` AS `t0_c54`, `t`.`navigationdelay` AS `t0_c55`, `t`.`nokeyboard` AS `t0_c56`, `t`.`alloweditaftercompletion` AS `t0_c57`, `t`.`googleanalyticsstyle` AS `t0_c58`, `t`.`googleanalyticsapikey` AS `t0_c59`, `t`.`tokenencryptionoptions` AS `t0_c60`, `languagesettings`.`surveyls_survey_id` AS `t1_c0`, `languagesettings`.`surveyls_language` AS `t1_c1`, `languagesettings`.`surveyls_title` AS `t1_c2`, `languagesettings`.`surveyls_description` AS `t1_c3`, `languagesettings`.`surveyls_welcometext` AS `t1_c4`, `languagesettings`.`surveyls_endtext` AS `t1_c5`, `languagesettings`.`surveyls_policy_notice` AS `t1_c6`, `languagesettings`.`surveyls_policy_error` AS `t1_c7`, `languagesettings`.`surveyls_policy_notice_label` AS `t1_c8`, `languagesettings`.`surveyls_url` AS `t1_c9`, `languagesettings`.`surveyls_urldescription` AS `t1_c10`, `languagesettings`.`surveyls_email_invite_subj` AS `t1_c11`, `languagesettings`.`surveyls_email_invite` AS `t1_c12`, `languagesettings`.`surveyls_email_remind_subj` AS `t1_c13`, `languagesettings`.`surveyls_email_remind` AS `t1_c14`, `languagesettings`.`surveyls_email_register_subj` AS `t1_c15`, `languagesettings`.`surveyls_email_register` AS `t1_c16`, `languagesettings`.`surveyls_email_confirm_subj` AS `t1_c17`, `languagesettings`.`surveyls_email_confirm` AS `t1_c18`, `languagesettings`.`surveyls_dateformat` AS `t1_c19`, `languagesettings`.`surveyls_attributecaptions` AS `t1_c20`, `languagesettings`.`surveyls_alias` AS `t1_c21`, `languagesettings`.`email_admin_notification_subj` AS `t1_c22`, `languagesettings`.`email_admin_notification` AS `t1_c23`, `languagesettings`.`email_admin_responses_subj` AS `t1_c24`, `languagesettings`.`email_admin_responses` AS `t1_c25`, `languagesettings`.`surveyls_numberformat` AS `t1_c26`, `languagesettings`.`attachments` AS `t1_c27`, `owner`.`uid` AS `t2_c0`, `owner`.`users_name` AS `t2_c1`, `owner`.`password` AS `t2_c2`, `owner`.`full_name` AS `t2_c3`, `owner`.`parent_id` AS `t2_c4`, `owner`.`lang` AS `t2_c5`, `owner`.`email` AS `t2_c6`, `owner`.`htmleditormode` AS `t2_c7`, `owner`.`templateeditormode` AS `t2_c8`, `owner`.`questionselectormode` AS `t2_c9`, `owner`.`one_time_pw` AS `t2_c10`, `owner`.`dateformat` AS `t2_c11`, `owner`.`last_login` AS `t2_c12`, `owner`.`created` AS `t2_c13`, `owner`.`modified` AS `t2_c14`, `owner`.`validation_key` AS `t2_c15`, `owner`.`validation_key_expiration` AS `t2_c16`, `owner`.`last_forgot_email_password` AS `t2_c17`, `owner`.`expires` AS `t2_c18` FROM `lime_surveys` `t`  LEFT OUTER JOIN `lime_surveys_languagesettings` `languagesettings` ON (`languagesettings`.`surveyls_survey_id`=`t`.`sid`) LEFT OUTER JOIN `lime_users` `owner` ON (`t`.`owner_id`=`owner`.`uid`) WHERE (surveyls_language=language)
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] User.findByPk()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_users` `t` WHERE `t`.`uid`=1 LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW FULL COLUMNS FROM `lime_surveys_groupsettings`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `lime_surveys_groupsettings`
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] SurveysGroupsettings.findByPk()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW FULL COLUMNS FROM `lime_surveys_groups`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `lime_surveys_groups`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT `t`.`gsid` AS `t0_c0`, `t`.`owner_id` AS `t0_c1`, `t`.`admin` AS `t0_c2`, `t`.`adminemail` AS `t0_c3`, `t`.`anonymized` AS `t0_c4`, `t`.`format` AS `t0_c5`, `t`.`savetimings` AS `t0_c6`, `t`.`template` AS `t0_c7`, `t`.`datestamp` AS `t0_c8`, `t`.`usecookie` AS `t0_c9`, `t`.`allowregister` AS `t0_c10`, `t`.`allowsave` AS `t0_c11`, `t`.`autonumber_start` AS `t0_c12`, `t`.`autoredirect` AS `t0_c13`, `t`.`allowprev` AS `t0_c14`, `t`.`printanswers` AS `t0_c15`, `t`.`ipaddr` AS `t0_c16`, `t`.`ipanonymize` AS `t0_c17`, `t`.`refurl` AS `t0_c18`, `t`.`showsurveypolicynotice` AS `t0_c19`, `t`.`publicstatistics` AS `t0_c20`, `t`.`publicgraphs` AS `t0_c21`, `t`.`listpublic` AS `t0_c22`, `t`.`htmlemail` AS `t0_c23`, `t`.`sendconfirmation` AS `t0_c24`, `t`.`tokenanswerspersistence` AS `t0_c25`, `t`.`assessments` AS `t0_c26`, `t`.`usecaptcha` AS `t0_c27`, `t`.`bounce_email` AS `t0_c28`, `t`.`attributedescriptions` AS `t0_c29`, `t`.`emailresponseto` AS `t0_c30`, `t`.`emailnotificationto` AS `t0_c31`, `t`.`tokenlength` AS `t0_c32`, `t`.`showxquestions` AS `t0_c33`, `t`.`showgroupinfo` AS `t0_c34`, `t`.`shownoanswer` AS `t0_c35`, `t`.`showqnumcode` AS `t0_c36`, `t`.`showwelcome` AS `t0_c37`, `t`.`showprogress` AS `t0_c38`, `t`.`questionindex` AS `t0_c39`, `t`.`navigationdelay` AS `t0_c40`, `t`.`nokeyboard` AS `t0_c41`, `t`.`alloweditaftercompletion` AS `t0_c42`, `SurveysGroups`.`gsid` AS `t1_c0`, `SurveysGroups`.`name` AS `t1_c1`, `SurveysGroups`.`title` AS `t1_c2`, `SurveysGroups`.`template` AS `t1_c3`, `SurveysGroups`.`description` AS `t1_c4`, `SurveysGroups`.`sortorder` AS `t1_c5`, `SurveysGroups`.`owner_id` AS `t1_c6`, `SurveysGroups`.`parent_id` AS `t1_c7`, `SurveysGroups`.`alwaysavailable` AS `t1_c8`, `SurveysGroups`.`created` AS `t1_c9`, `SurveysGroups`.`modified` AS `t1_c10`, `SurveysGroups`.`created_by` AS `t1_c11` FROM `lime_surveys_groupsettings` `t`  LEFT OUTER JOIN `lime_surveys_groups` `SurveysGroups` ON (`SurveysGroups`.`gsid`=`t`.`gsid`) WHERE (`t`.`gsid`=1)
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] User.findByPk()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_users` `t` WHERE `t`.`uid`=1 LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] SurveysGroupsettings.findByPk()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_surveys_groupsettings` `t` WHERE `t`.`gsid`=0 LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] SurveyLanguageSetting.findByAttributes()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_surveys_languagesettings` `t` WHERE `t`.`surveyls_survey_id`=:yp0 AND `t`.`surveyls_language`=:yp1 LIMIT 1
2023/05/26 11:26:22 [trace] [system.CModule] Loading "log" application component
2023/05/26 11:26:22 [trace] [system.CModule] Loading "ETwigViewRenderer" application component
2023/05/26 11:26:22 [trace] [system.CModule] Loading "request" application component
2023/05/26 11:26:22 [trace] [system.CModule] Loading "urlManager" application component
2023/05/26 11:26:22 [trace] [system.CModule] Loading "cache" application component
2023/05/26 11:26:22 [trace] [application] Route "admin/remotecontrol passed without CSRF validation
2023/05/26 11:26:22 [trace] [system.CModule] Loading "session" application component
2023/05/26 11:26:22 [trace] [system.CModule] Loading "db" application component
2023/05/26 11:26:22 [trace] [system.db.CDbConnection] Opening DB connection
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW FULL COLUMNS FROM `lime_settings_global`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `lime_settings_global`
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] SettingGlobal.findAll()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_settings_global` `t`
2023/05/26 11:26:22 [trace] [system.CModule] Loading "assetManager" application component
2023/05/26 11:26:22 [trace] [system.CModule] Loading "bootstrap" application component
2023/05/26 11:26:22 [trace] [system.CModule] Loading "user" application component
2023/05/26 11:26:22 [trace] [system.CModule] Loading "messages" application component
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT `t1`.`message` AS `message`, `t2`.`translation` AS `translation`
FROM `lime_source_message` `t1`, `lime_message` `t2`
WHERE t1.id=t2.id AND t1.category=:category AND t2.language=:language
2023/05/26 11:26:22 [trace] [system.CModule] Loading "clientScript" application component
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW FULL COLUMNS FROM `lime_surveys`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `lime_surveys`
2023/05/26 11:26:22 [trace] [system.CModule] Loading "pluginManager" application component
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] SettingGlobal.find()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_settings_global` `t` WHERE stg_name=:name LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW FULL COLUMNS FROM `lime_plugins`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `lime_plugins`
2023/05/26 11:26:22 [trace] [system.CModule] Loading "sodium" application component
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Plugin.findAllByAttributes()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_plugins` `t` WHERE `t`.`active`=:yp0 ORDER BY priority DESC
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Session.deleteAll()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW FULL COLUMNS FROM `lime_sessions`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `lime_sessions`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Executing SQL: DELETE FROM `lime_sessions` WHERE expire < 1685093182
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Session.findByPk()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_sessions` `t` WHERE `t`.`id`='6W9RlJT7fWmV01grsmH_GiYkOp_vIURE' LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW FULL COLUMNS FROM `lime_users`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `lime_users`
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] User.findByAttributes()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_users` `t` WHERE `t`.`users_name`=:yp0 LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Survey.findByPk()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_surveys` `t` WHERE `t`.`sid`=925344 LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW FULL COLUMNS FROM `lime_permissions`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `lime_permissions`
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Permission.findByAttributes()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_permissions` `t` WHERE `t`.`entity_id`=:yp0 AND `t`.`entity`=:yp1 AND `t`.`uid`=:yp2 AND `t`.`permission`=:yp3 LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] User.findByPk()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_users` `t` WHERE `t`.`uid`=1 LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW FULL COLUMNS FROM `lime_surveys_groupsettings`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `lime_surveys_groupsettings`
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] SurveysGroupsettings.findByPk()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW FULL COLUMNS FROM `lime_surveys_groups`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `lime_surveys_groups`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT `t`.`gsid` AS `t0_c0`, `t`.`owner_id` AS `t0_c1`, `t`.`admin` AS `t0_c2`, `t`.`adminemail` AS `t0_c3`, `t`.`anonymized` AS `t0_c4`, `t`.`format` AS `t0_c5`, `t`.`savetimings` AS `t0_c6`, `t`.`template` AS `t0_c7`, `t`.`datestamp` AS `t0_c8`, `t`.`usecookie` AS `t0_c9`, `t`.`allowregister` AS `t0_c10`, `t`.`allowsave` AS `t0_c11`, `t`.`autonumber_start` AS `t0_c12`, `t`.`autoredirect` AS `t0_c13`, `t`.`allowprev` AS `t0_c14`, `t`.`printanswers` AS `t0_c15`, `t`.`ipaddr` AS `t0_c16`, `t`.`ipanonymize` AS `t0_c17`, `t`.`refurl` AS `t0_c18`, `t`.`showsurveypolicynotice` AS `t0_c19`, `t`.`publicstatistics` AS `t0_c20`, `t`.`publicgraphs` AS `t0_c21`, `t`.`listpublic` AS `t0_c22`, `t`.`htmlemail` AS `t0_c23`, `t`.`sendconfirmation` AS `t0_c24`, `t`.`tokenanswerspersistence` AS `t0_c25`, `t`.`assessments` AS `t0_c26`, `t`.`usecaptcha` AS `t0_c27`, `t`.`bounce_email` AS `t0_c28`, `t`.`attributedescriptions` AS `t0_c29`, `t`.`emailresponseto` AS `t0_c30`, `t`.`emailnotificationto` AS `t0_c31`, `t`.`tokenlength` AS `t0_c32`, `t`.`showxquestions` AS `t0_c33`, `t`.`showgroupinfo` AS `t0_c34`, `t`.`shownoanswer` AS `t0_c35`, `t`.`showqnumcode` AS `t0_c36`, `t`.`showwelcome` AS `t0_c37`, `t`.`showprogress` AS `t0_c38`, `t`.`questionindex` AS `t0_c39`, `t`.`navigationdelay` AS `t0_c40`, `t`.`nokeyboard` AS `t0_c41`, `t`.`alloweditaftercompletion` AS `t0_c42`, `SurveysGroups`.`gsid` AS `t1_c0`, `SurveysGroups`.`name` AS `t1_c1`, `SurveysGroups`.`title` AS `t1_c2`, `SurveysGroups`.`template` AS `t1_c3`, `SurveysGroups`.`description` AS `t1_c4`, `SurveysGroups`.`sortorder` AS `t1_c5`, `SurveysGroups`.`owner_id` AS `t1_c6`, `SurveysGroups`.`parent_id` AS `t1_c7`, `SurveysGroups`.`alwaysavailable` AS `t1_c8`, `SurveysGroups`.`created` AS `t1_c9`, `SurveysGroups`.`modified` AS `t1_c10`, `SurveysGroups`.`created_by` AS `t1_c11` FROM `lime_surveys_groupsettings` `t`  LEFT OUTER JOIN `lime_surveys_groups` `SurveysGroups` ON (`SurveysGroups`.`gsid`=`t`.`gsid`) WHERE (`t`.`gsid`=1)
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] User.findByPk()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_users` `t` WHERE `t`.`uid`=1 LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] SurveysGroupsettings.findByPk()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_surveys_groupsettings` `t` WHERE `t`.`gsid`=0 LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW FULL COLUMNS FROM `lime_questions`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `lime_questions`
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Question.findAll()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW FULL COLUMNS FROM `lime_groups`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `lime_groups`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT `t`.`qid` AS `t0_c0`, `t`.`parent_qid` AS `t0_c1`, `t`.`sid` AS `t0_c2`, `t`.`gid` AS `t0_c3`, `t`.`type` AS `t0_c4`, `t`.`title` AS `t0_c5`, `t`.`preg` AS `t0_c6`, `t`.`other` AS `t0_c7`, `t`.`mandatory` AS `t0_c8`, `t`.`encrypted` AS `t0_c9`, `t`.`question_order` AS `t0_c10`, `t`.`scale_id` AS `t0_c11`, `t`.`same_default` AS `t0_c12`, `t`.`relevance` AS `t0_c13`, `t`.`question_theme_name` AS `t0_c14`, `t`.`modulename` AS `t0_c15`, `t`.`same_script` AS `t0_c16`, `group`.`gid` AS `t1_c0`, `group`.`sid` AS `t1_c1`, `group`.`group_order` AS `t1_c2`, `group`.`randomization_group` AS `t1_c3`, `group`.`grelevance` AS `t1_c4` FROM `lime_questions` `t`  LEFT OUTER JOIN `lime_groups` `group` ON (`t`.`gid`=`group`.`gid`) WHERE (t.sid=:sid) ORDER BY group_order,question_order
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW TABLES
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT a.qid, a.sqid, a.scale_id, a.specialtype, al10.defaultvalue FROM lime_defaultvalues as a  JOIN lime_defaultvalue_l10ns as al10 ON a.dvid = al10.dvid  JOIN lime_questions as b ON a.qid = b.qid  AND al10.language = 'de' AND b.same_default=0 AND b.sid = 925344
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT a.qid, a.sqid, a.scale_id, a.specialtype, al10.defaultvalue FROM lime_defaultvalues as a  JOIN lime_defaultvalue_l10ns as al10 ON a.dvid = al10.dvid  JOIN lime_questions as b ON a.qid = b.qid  AND al10.language = 'de' AND b.same_default=1 AND b.sid = 925344
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT g.*, q.*, gls.*, qls.* FROM `lime_groups` g JOIN lime_questions q on q.gid=g.gid  JOIN lime_group_l10ns gls on gls.gid=g.gid  JOIN lime_question_l10ns qls on qls.qid=q.qid  WHERE qls.language='de' and gls.language='de' AND g.sid=925344 AND q.parent_qid=0 ORDER BY group_order, question_order
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW FULL COLUMNS FROM `lime_question_themes`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `lime_question_themes`
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] QuestionTheme.findAllByAttributes()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_question_themes` `t` WHERE `t`.`extends`=:yp0
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW FULL COLUMNS FROM `lime_survey_925344`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `lime_survey_925344`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT count(*) FROM lime_survey_925344
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT count(*) FROM lime_survey_925344
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Question.findByPk()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_questions` `t` WHERE `t`.`qid`=1 LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] lazy loading Question.questionl10ns
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW FULL COLUMNS FROM `lime_question_l10ns`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `lime_question_l10ns`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT `questionl10ns`.`id` AS `t1_c0`, `questionl10ns`.`qid` AS `t1_c1`, `questionl10ns`.`question` AS `t1_c2`, `questionl10ns`.`help` AS `t1_c3`, `questionl10ns`.`script` AS `t1_c4`, `questionl10ns`.`language` AS `t1_c5` FROM `lime_question_l10ns` `questionl10ns`  WHERE (`questionl10ns`.`qid`=:ypl0)
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Response_925344.findAll()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_survey_925344` `t`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT `t1`.`message` AS `message`, `t2`.`translation` AS `translation`
FROM `lime_source_message` `t1`, `lime_message` `t2`
WHERE t1.id=t2.id AND t1.category=:category AND t2.language=:language
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW FULL COLUMNS FROM `lime_question_attributes`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `lime_question_attributes`
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Question.find()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_questions` `t` WHERE qid=:qid LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] QuestionTheme.findByAttributes()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_question_themes` `t` WHERE question_type = :question_type AND extends = :extends LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] QuestionTheme.findByAttributes()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_question_themes` `t` WHERE name = :name AND extends = :extends LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] lazy loading Question.survey
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT `survey`.`sid` AS `t1_c0`, `survey`.`owner_id` AS `t1_c1`, `survey`.`gsid` AS `t1_c2`, `survey`.`admin` AS `t1_c3`, `survey`.`active` AS `t1_c4`, `survey`.`expires` AS `t1_c5`, `survey`.`startdate` AS `t1_c6`, `survey`.`adminemail` AS `t1_c7`, `survey`.`anonymized` AS `t1_c8`, `survey`.`format` AS `t1_c9`, `survey`.`savetimings` AS `t1_c10`, `survey`.`template` AS `t1_c11`, `survey`.`language` AS `t1_c12`, `survey`.`additional_languages` AS `t1_c13`, `survey`.`datestamp` AS `t1_c14`, `survey`.`usecookie` AS `t1_c15`, `survey`.`allowregister` AS `t1_c16`, `survey`.`allowsave` AS `t1_c17`, `survey`.`autonumber_start` AS `t1_c18`, `survey`.`autoredirect` AS `t1_c19`, `survey`.`allowprev` AS `t1_c20`, `survey`.`printanswers` AS `t1_c21`, `survey`.`ipaddr` AS `t1_c22`, `survey`.`ipanonymize` AS `t1_c23`, `survey`.`refurl` AS `t1_c24`, `survey`.`datecreated` AS `t1_c25`, `survey`.`showsurveypolicynotice` AS `t1_c26`, `survey`.`publicstatistics` AS `t1_c27`, `survey`.`publicgraphs` AS `t1_c28`, `survey`.`listpublic` AS `t1_c29`, `survey`.`htmlemail` AS `t1_c30`, `survey`.`sendconfirmation` AS `t1_c31`, `survey`.`tokenanswerspersistence` AS `t1_c32`, `survey`.`assessments` AS `t1_c33`, `survey`.`usecaptcha` AS `t1_c34`, `survey`.`usetokens` AS `t1_c35`, `survey`.`bounce_email` AS `t1_c36`, `survey`.`attributedescriptions` AS `t1_c37`, `survey`.`emailresponseto` AS `t1_c38`, `survey`.`emailnotificationto` AS `t1_c39`, `survey`.`tokenlength` AS `t1_c40`, `survey`.`showxquestions` AS `t1_c41`, `survey`.`showgroupinfo` AS `t1_c42`, `survey`.`shownoanswer` AS `t1_c43`, `survey`.`showqnumcode` AS `t1_c44`, `survey`.`bouncetime` AS `t1_c45`, `survey`.`bounceprocessing` AS `t1_c46`, `survey`.`bounceaccounttype` AS `t1_c47`, `survey`.`bounceaccounthost` AS `t1_c48`, `survey`.`bounceaccountpass` AS `t1_c49`, `survey`.`bounceaccountencryption` AS `t1_c50`, `survey`.`bounceaccountuser` AS `t1_c51`, `survey`.`showwelcome` AS `t1_c52`, `survey`.`showprogress` AS `t1_c53`, `survey`.`questionindex` AS `t1_c54`, `survey`.`navigationdelay` AS `t1_c55`, `survey`.`nokeyboard` AS `t1_c56`, `survey`.`alloweditaftercompletion` AS `t1_c57`, `survey`.`googleanalyticsstyle` AS `t1_c58`, `survey`.`googleanalyticsapikey` AS `t1_c59`, `survey`.`tokenencryptionoptions` AS `t1_c60` FROM `lime_surveys` `survey`  WHERE (`survey`.`sid`=:ypl0)
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] User.findByPk()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_users` `t` WHERE `t`.`uid`=1 LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] SurveysGroupsettings.findByPk()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT `t`.`gsid` AS `t0_c0`, `t`.`owner_id` AS `t0_c1`, `t`.`admin` AS `t0_c2`, `t`.`adminemail` AS `t0_c3`, `t`.`anonymized` AS `t0_c4`, `t`.`format` AS `t0_c5`, `t`.`savetimings` AS `t0_c6`, `t`.`template` AS `t0_c7`, `t`.`datestamp` AS `t0_c8`, `t`.`usecookie` AS `t0_c9`, `t`.`allowregister` AS `t0_c10`, `t`.`allowsave` AS `t0_c11`, `t`.`autonumber_start` AS `t0_c12`, `t`.`autoredirect` AS `t0_c13`, `t`.`allowprev` AS `t0_c14`, `t`.`printanswers` AS `t0_c15`, `t`.`ipaddr` AS `t0_c16`, `t`.`ipanonymize` AS `t0_c17`, `t`.`refurl` AS `t0_c18`, `t`.`showsurveypolicynotice` AS `t0_c19`, `t`.`publicstatistics` AS `t0_c20`, `t`.`publicgraphs` AS `t0_c21`, `t`.`listpublic` AS `t0_c22`, `t`.`htmlemail` AS `t0_c23`, `t`.`sendconfirmation` AS `t0_c24`, `t`.`tokenanswerspersistence` AS `t0_c25`, `t`.`assessments` AS `t0_c26`, `t`.`usecaptcha` AS `t0_c27`, `t`.`bounce_email` AS `t0_c28`, `t`.`attributedescriptions` AS `t0_c29`, `t`.`emailresponseto` AS `t0_c30`, `t`.`emailnotificationto` AS `t0_c31`, `t`.`tokenlength` AS `t0_c32`, `t`.`showxquestions` AS `t0_c33`, `t`.`showgroupinfo` AS `t0_c34`, `t`.`shownoanswer` AS `t0_c35`, `t`.`showqnumcode` AS `t0_c36`, `t`.`showwelcome` AS `t0_c37`, `t`.`showprogress` AS `t0_c38`, `t`.`questionindex` AS `t0_c39`, `t`.`navigationdelay` AS `t0_c40`, `t`.`nokeyboard` AS `t0_c41`, `t`.`alloweditaftercompletion` AS `t0_c42`, `SurveysGroups`.`gsid` AS `t1_c0`, `SurveysGroups`.`name` AS `t1_c1`, `SurveysGroups`.`title` AS `t1_c2`, `SurveysGroups`.`template` AS `t1_c3`, `SurveysGroups`.`description` AS `t1_c4`, `SurveysGroups`.`sortorder` AS `t1_c5`, `SurveysGroups`.`owner_id` AS `t1_c6`, `SurveysGroups`.`parent_id` AS `t1_c7`, `SurveysGroups`.`alwaysavailable` AS `t1_c8`, `SurveysGroups`.`created` AS `t1_c9`, `SurveysGroups`.`modified` AS `t1_c10`, `SurveysGroups`.`created_by` AS `t1_c11` FROM `lime_surveys_groupsettings` `t`  LEFT OUTER JOIN `lime_surveys_groups` `SurveysGroups` ON (`SurveysGroups`.`gsid`=`t`.`gsid`) WHERE (`t`.`gsid`=1)
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] User.findByPk()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_users` `t` WHERE `t`.`uid`=1 LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] SurveysGroupsettings.findByPk()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_surveys_groupsettings` `t` WHERE `t`.`gsid`=0 LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] QuestionAttribute.findAll()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_question_attributes` `t` WHERE qid=:qid
2023/05/26 11:26:22 [trace] [system.CModule] Loading "log" application component
2023/05/26 11:26:22 [trace] [system.CModule] Loading "ETwigViewRenderer" application component
2023/05/26 11:26:22 [trace] [system.CModule] Loading "request" application component
2023/05/26 11:26:22 [trace] [system.CModule] Loading "urlManager" application component
2023/05/26 11:26:22 [trace] [system.CModule] Loading "cache" application component
2023/05/26 11:26:22 [trace] [application] Route "admin/remotecontrol passed without CSRF validation
2023/05/26 11:26:22 [trace] [system.CModule] Loading "session" application component
2023/05/26 11:26:22 [trace] [system.CModule] Loading "db" application component
2023/05/26 11:26:22 [trace] [system.db.CDbConnection] Opening DB connection
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW FULL COLUMNS FROM `lime_settings_global`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `lime_settings_global`
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] SettingGlobal.findAll()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_settings_global` `t`
2023/05/26 11:26:22 [trace] [system.CModule] Loading "assetManager" application component
2023/05/26 11:26:22 [trace] [system.CModule] Loading "bootstrap" application component
2023/05/26 11:26:22 [trace] [system.CModule] Loading "user" application component
2023/05/26 11:26:22 [trace] [system.CModule] Loading "messages" application component
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT `t1`.`message` AS `message`, `t2`.`translation` AS `translation`
FROM `lime_source_message` `t1`, `lime_message` `t2`
WHERE t1.id=t2.id AND t1.category=:category AND t2.language=:language
2023/05/26 11:26:22 [trace] [system.CModule] Loading "clientScript" application component
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW FULL COLUMNS FROM `lime_surveys`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `lime_surveys`
2023/05/26 11:26:22 [trace] [system.CModule] Loading "pluginManager" application component
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] SettingGlobal.find()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_settings_global` `t` WHERE stg_name=:name LIMIT 1
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW FULL COLUMNS FROM `lime_plugins`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `lime_plugins`
2023/05/26 11:26:22 [trace] [system.CModule] Loading "sodium" application component
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Plugin.findAllByAttributes()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `lime_plugins` `t` WHERE `t`.`active`=:yp0 ORDER BY priority DESC
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Session.deleteAllByAttributes()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW FULL COLUMNS FROM `lime_sessions`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `lime_sessions`
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Executing SQL: DELETE FROM `lime_sessions` WHERE `lime_sessions`.`id`=:yp0
2023/05/26 11:26:22 [trace] [system.db.ar.CActiveRecord] Session.deleteAll()
2023/05/26 11:26:22 [trace] [system.db.CDbCommand] Executing SQL: DELETE FROM `lime_sessions` WHERE expire < 1685093182

export_statistics_LSRC2.log (45,574 bytes)   
gabrieljenik

gabrieljenik

2023-05-26 15:56

manager   ~75234

Is the script that uses remote control on the same server as the LS installation?
If not, can you please test it on the same server?

That way it will give us more information... maybe a firewall issue.

I will review.
Thanks!

gabrieljenik

gabrieljenik

2023-05-26 16:09

manager   ~75235

Also, have you approached this?

Also, please, can you test the export_statistics with a simple survey with only a single choice question?

Besides array questions, what other question types does your survey have?
The error we fixed could be spreaded on other question types maybe.

Thanks!

OliverR

OliverR

2023-05-30 10:40

reporter   ~75248

Dear gabrieljenik,

On the new testsystem (OS: Ubuntu 20.04, PHP 7.4, LS 5.6.23) I did run the API calls locally and the behavior is the same: The expected base64 encoded xls file is not returned, instead an empty result (with no error is given). The xls file is generated by LS anyway and can be found in the ls web/tmp directory. I'll attach a screenshot to clarify. As mentioned earlier, no php-errors were logged, neither to syslog, webserver log or a dedicated php log file.

All recent test were performed against a newly created survey with only one single choice question and the error stayed the same. I did not try to import my original survey because of that.

Thanks again for your help!

export_statistics.php (2,784 bytes)   
<?php
require_once './jsonrpcphp/src/org/jsonrpcphp/JsonRPCClient.php';

include 'config.php';


$lsJSONRPCClient = new org\jsonrpcphp\JsonRPCClient($rpcUrl);
$sessionKey= $lsJSONRPCClient->get_session_key($rpcSessionUser,$rpcSessionPassword );
//~ If an error happen
if(is_array($sessionKey))
{
    print_r($sessionKey);
    die();
}

$excludedSids = array(1, 2, 4);


$surveys = $lsJSONRPCClient->list_surveys(
	    $sessionKey
    );
if(is_array($surveys)) {
	// Print all Array Elements
	print_r($surveys);
	}
if(is_array($surveys)) {
      print "\nStart iteration over surverys\n";
      foreach($surveys as $survey) {
            if (in_array($survey['sid'], $excludedSids)) {
                    echo $survey['sid'] . " is excluded, go next\n";
                    continue; // Skip the current iteration if excluded sid is encountered
                }
//                $survey['sid']=644242;
            	echo "begin to fetch " . $survey['sid'] . "\n";
            	$result = $lsJSONRPCClient->export_statistics(
	    			$sessionKey,$survey['sid'],"xls"
    			);
    		echo "\nResult feteched\n";
    		echo "Result lenght:" . strlen($result) . "\n";
    		$filecontent = base64_decode($result);
    		echo $filecontent;
    		$exportdir='/ram/'.$survey['sid'];
    		if (!file_exists($exportdir)) {
				mkdir($exportdir, 0770, true);
				}
			$filepath=$exportdir.'/'.$survey['sid'].'_Statistik.xls';
			$success = file_put_contents($filepath, $filecontent);
			print $success ? $filepath : "Unable to save the file.\n";
                	//echo "\t Var Dump : ". var_dump($result) ."\r";
                	//echo "\t Survey list : ". print_r($result);
				//echo json_encode($result);
            	
            }
		//print_r($surveys);
        //echo $surveys[1]['sid'];
                //echo "\t Error happen : ". print_r($surveys);
	    } else {
		echo gettype($surveys)."\n";
                //echo "\t Var Dump : ". var_dump($surveys) ."\r";
                //echo "\t Survey list : ". print_r($surveys);
		//echo json_encode($surveys);
            }


/*    $result = $lsJSONRPCClient->export_statistics(
	    $sessionKey,221001,'xls'
    );
            if(is_array($result)) {
		print_r($result);
                //echo "\t Error happen : ". print_r($result);
	    } else {
		echo gettype($result)."\n";
		$filecontent = base64_decode($result);
		$filepath='./'.uniqid().'.xls';
		$success = file_put_contents($filepath, $filecontent);
		print $success ? $filepath : 'Unable to save the file.';
                //echo "\t Var Dump : ". var_dump($result) ."\r";
                //echo "\t Survey list : ". print_r($result);
		//echo json_encode($result);
            }
            */
//~ release the session key
$lsJSONRPCClient->release_session_key( $sessionKey );
export_statistics.php (2,784 bytes)   
gabrieljenik

gabrieljenik

2023-05-30 14:44

manager   ~75252

The xls file is generated by LS anyway and can be found in the ls web/tmp directory. I'll attach a screenshot to clarify

Have you opened that file?

This is very strange. I will review and be back.

Thanks

gabrieljenik

gabrieljenik

2023-05-30 14:45

manager   ~75253

Please, can you send me the simple LSA you used? (will save some time)

OliverR

OliverR

2023-05-30 15:43

reporter   ~75257

Attached you will find the LSA of the "FirstTest" survey. I also opened the xls file from the tmp directory, it looks absolutely fine (screenshot attached). In case the small test works for you: In one of the messages above I posted the longer survey that I started to discover the problems with. If you like, you can also test with this one.

Thank you for reviewing the issue. If you want me to test other things, just let me know.

Regards

gabrieljenik

gabrieljenik

2023-06-05 18:43

manager   ~75422

Found the issue.

OliverR

OliverR

2023-06-07 11:26

reporter   ~75457

Thank you for testing and acknowledging the issue. If you need assistance on testing/trying, please let me know. Or were you already able to fix the issue? I just saw that there is a new release: 5.6.23 (my last test) -> 5.6.25

gabrieljenik

gabrieljenik

2023-06-07 16:32

manager   ~75466

No, not ready released yet.
If you want a workaround, please see this: https://github.com/LimeSurvey/LimeSurvey/commit/da5b36a203ebffdd406661252661e1b0dcfc5c19

gabrieljenik

gabrieljenik

2023-06-12 21:45

manager   ~75564

PR for v5: https://github.com/LimeSurvey/LimeSurvey/pull/3216

DenisChenu

DenisChenu

2023-06-13 09:14

developer   ~75570

Just remove santizer.
Less code is always better, and filename are generated. No user input.

If there are potential security issue : must be fixed in helper ( not the case here)

gabrieljenik

gabrieljenik

2023-06-22 21:48

manager   ~75809

Master: https://github.com/LimeSurvey/LimeSurvey/pull/3244

gabrieljenik

gabrieljenik

2023-07-07 23:17

manager   ~75988

V5 is pending to be reviewed and merged
https://github.com/LimeSurvey/LimeSurvey/pull/3216

DenisChenu

DenisChenu

2023-07-10 10:31

developer   ~75993

:+1:

guest

guest

2023-07-10 12:18

viewer   ~75998

Fix committed to 5.x branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&amp;id=34950

guest

guest

2023-07-10 15:41

viewer   ~76017

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&amp;id=34955

LimeBot

LimeBot

2023-07-17 10:07

administrator   ~76106

Fixed in Release 6.1.8+230717

Related Changesets

LimeSurvey: 5.x ff5516e1

2023-07-10 12:07:45

Gabriel Jenik


Committer: GitHub Details Diff
Fixed issue 18368: export_statistics from API Yields error (#3216)

Co-authored-by: lapiudevgit <devgit@lapiu.biz>
Affected Issues
18368
mod - application/helpers/remotecontrol/remotecontrol_handle.php Diff File
mod - tests/unit/helpers/remotecontrol/ExportStatisticsTest.php Diff File

LimeSurvey: master de80ea94

2023-07-10 15:40:59

Gabriel Jenik


Committer: GitHub Details Diff
Fixed issue 18368: export_statistics from API Yields error (#3244)

Co-authored-by: lapiudevgit <devgit@lapiu.biz>
Affected Issues
18368
mod - application/helpers/remotecontrol/remotecontrol_handle.php Diff File
mod - tests/unit/helpers/remotecontrol/ExportStatisticsTest.php Diff File

Issue History

Date Modified Username Field Change
2022-09-21 13:24 giorgi New Issue
2022-09-23 16:24 ollehar Priority none => normal
2022-09-24 00:00 gabrieljenik Status new => acknowledged
2022-09-24 00:01 gabrieljenik Note Added: 71930
2022-09-24 00:01 gabrieljenik Bug heat 0 => 2
2023-01-19 13:46 gabrieljenik Status acknowledged => feedback
2023-01-19 13:46 gabrieljenik Note Added: 73498
2023-05-23 10:01 OliverR Issue Monitored: OliverR
2023-05-23 10:01 OliverR Bug heat 2 => 4
2023-05-23 10:23 OliverR Note Added: 75148
2023-05-23 10:23 OliverR Bug heat 4 => 6
2023-05-23 11:46 guest Bug heat 6 => 12
2023-05-23 12:18 OliverR Note Added: 75153
2023-05-23 12:18 OliverR File Added: survey_archive_644242.lsa
2023-05-23 15:18 gabrieljenik Note Added: 75156
2023-05-23 15:51 OliverR Note Added: 75165
2023-05-23 15:59 gabrieljenik Note Added: 75168
2023-05-23 15:59 gabrieljenik Relationship added duplicate of 18814
2023-05-23 16:00 gabrieljenik Note Added: 75169
2023-05-23 16:29 OliverR Note Added: 75177
2023-05-24 13:42 OliverR Note Added: 75213
2023-05-24 13:42 OliverR File Added: Bildschirmfoto vom 2023-05-24 13-39-33.png
2023-05-24 13:42 OliverR File Added: Bildschirmfoto vom 2023-05-24 13-35-17.png
2023-05-24 13:42 OliverR File Added: Bildschirmfoto vom 2023-05-24 13-34-38.png
2023-05-24 13:42 OliverR File Added: Bildschirmfoto vom 2023-05-24 13-34-16.png
2023-05-24 14:36 gabrieljenik Note Added: 75217
2023-05-26 12:09 OliverR Note Added: 75229
2023-05-26 12:09 OliverR File Added: export_statistics_LSRC2.log
2023-05-26 15:56 gabrieljenik Note Added: 75234
2023-05-26 16:09 gabrieljenik Note Added: 75235
2023-05-30 10:40 OliverR Note Added: 75248
2023-05-30 10:40 OliverR File Added: export_statistics.php
2023-05-30 10:40 OliverR File Added: Bildschirmfoto vom 2023-05-30 10-13-53.png
2023-05-30 14:44 gabrieljenik Note Added: 75252
2023-05-30 14:45 gabrieljenik Note Added: 75253
2023-05-30 15:43 OliverR Note Added: 75257
2023-05-30 15:43 OliverR File Added: surveys_archive_925344.zip
2023-05-30 15:43 OliverR File Added: Bildschirmfoto vom 2023-05-30 15-39-12.png
2023-06-05 18:43 gabrieljenik Note Added: 75422
2023-06-07 11:26 OliverR Note Added: 75457
2023-06-07 16:32 gabrieljenik Note Added: 75466
2023-06-07 16:34 gabrieljenik Assigned To => gabrieljenik
2023-06-07 16:34 gabrieljenik Status feedback => assigned
2023-06-12 21:45 gabrieljenik Assigned To gabrieljenik => DenisChenu
2023-06-12 21:45 gabrieljenik Status assigned => ready for code review
2023-06-12 21:45 gabrieljenik Note Added: 75564
2023-06-13 09:14 DenisChenu Assigned To DenisChenu => gabrieljenik
2023-06-13 09:14 DenisChenu Status ready for code review => in code review
2023-06-13 09:14 DenisChenu Note Added: 75570
2023-06-13 09:14 DenisChenu Bug heat 12 => 14
2023-06-22 21:48 gabrieljenik Note Added: 75809
2023-07-07 23:17 gabrieljenik Assigned To gabrieljenik => DenisChenu
2023-07-07 23:17 gabrieljenik Note Added: 75988
2023-07-10 10:31 DenisChenu Assigned To DenisChenu => gabrieljenik
2023-07-10 10:31 DenisChenu Status in code review => ready for merge
2023-07-10 10:31 DenisChenu Note Added: 75993
2023-07-10 12:18 Changeset attached => LimeSurvey 5.x ff5516e1
2023-07-10 12:18 guest Note Added: 75998
2023-07-10 12:18 guest Bug heat 14 => 16
2023-07-10 14:41 gabrieljenik Status ready for merge => resolved
2023-07-10 14:41 gabrieljenik Resolution open => fixed
2023-07-10 14:47 gabrieljenik Assigned To gabrieljenik => tibor.pacalat
2023-07-10 14:47 gabrieljenik Status resolved => ready for merge
2023-07-10 15:41 Changeset attached => LimeSurvey master de80ea94
2023-07-10 15:41 guest Note Added: 76017
2023-07-10 15:41 tibor.pacalat Status ready for merge => resolved
2023-07-10 15:41 tibor.pacalat Resolution fixed => duplicate
2023-07-17 10:07 LimeBot Note Added: 76106
2023-07-17 10:07 LimeBot Status resolved => closed
2023-07-17 10:07 LimeBot Resolution duplicate => fixed
2023-07-17 10:07 LimeBot Bug heat 16 => 18