View Issue Details

IDProjectCategoryView StatusLast Update
15256Bug reports[All Projects] RemoteControlpublic2019-09-11 17:42
Reportergbasterra Assigned Tocdorin  
Status closedResolutionno change required 
Product Version3.17.x 
Target VersionFixed in Version 
Summary15256: get_session_key not working properly

When executing a get_session_key with postman as per the attachments I´ve got the following errors :
1- First time executed (lime_sessions table clean) => {"id":1,"result":null,"error":"unknown method or incorrect parameters"} (screen1)
2- Second time : {"id":1,"result":null,"error":"CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'PRIMARY'. The SQL statement executed was: INSERT INTO lime_sessions (id, expire, data) VALUES (:yp0, :yp1, :yp2). Bound with :yp0='', :yp1=1568076066, :yp2='admin'"} (screen2)
3- In the table lime_sessions I see there´s an entry without any id (null or blank). (see attachment screen3)

As per my understanding the server is not being able to create the random id and because of that the first time it creates an entry in the table with id null so the second time when it tries to create a second row it´s rejected because id is null too.
Is it possible yii is not running or not being installed properly?

public function get_session_key($username, $password, $plugin = 'Authdb')
    $username = (string) $username;
    $password = (string) $password;
    $loginResult = $this->_doLogin($username, $password, $plugin);
    if ($loginResult === true) {
        $sSessionKey = Yii::app()->securityManager->generateRandomString(32);
        $session = new Session;
        $session->id = $sSessionKey;


Steps To Reproduce

Execute in postman as indicated replacing localhost with

screen1 and screen2

TagsNo tags attached.
Complete LimeSurvey version number (& build)Limesurvey Version 3.17.13+190824
I will donate to the project if issue is resolvedNo
Database & DB-VersionMySQL 8.0.17
Server OS (if known)Windows 7 - X64
Webserver software & version (if known)
PHP Version7.3.8




2019-09-10 01:16


screen1.png (154,441 bytes)
screen3.png (190,472 bytes)
screen2.png (135,113 bytes)


2019-09-10 19:33

reporter   ~53543

Found the issue. Yii was not installed. I think this should be included in the preinstall steps in documentation. Misleading to know where was the issue.



2019-09-11 17:42

manager   ~53559

Hello, and thank you for mentioning what the issue was. Could you please add a note somewhere in the manual about the issue you found? Perhaps here: ? Many thanks!

Issue History

Date Modified Username Field Change
2019-09-10 01:16 gbasterra New Issue
2019-09-10 01:16 gbasterra File Added: screen1.png
2019-09-10 01:16 gbasterra File Added: screen3.png
2019-09-10 01:16 gbasterra File Added: screen2.png
2019-09-10 19:33 gbasterra Note Added: 53543
2019-09-11 17:42 cdorin Assigned To => cdorin
2019-09-11 17:42 cdorin Status new => closed
2019-09-11 17:42 cdorin Resolution open => no change required
2019-09-11 17:42 cdorin Note Added: 53559