Welcome to the LimeSurvey Community Forum

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

get_session_key throws exception

  • debrota
  • debrota's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 11 months ago #199491 by debrota
get_session_key throws exception was created by debrota
LimeSurvey version
4.2.3
LimeSurvey build
200511

Every time my PHP program reaches this line:

$sSessionKey= $myJSONRPCClient->get_session_key( LS_USER, LS_PASSWORD );


I get:

Fatal error: Uncaught Exception: Incorrect response id (request id: 1, response id: )

in jsonRPCClient.php on line 158


I've tried presenting the password in every way I can think of... as plain text, as the encoded value I find in the lime_users table on the database, etc.

define( 'LS_USER', 'admin' );

define( 'LS_PASSWORD', ' ' );


Any suggestions?

Dave
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 11 months ago #199499 by DenisChenu
Replied by DenisChenu on topic get_session_key throws exception
You have plugins maybe ?

Else : can you update your config.php file to create a log file and set debug at 2 ?
manual.limesurvey.org/Optional_settings#Logging_settings

(maybe there are an issue in 4.X)

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.
  • debrota
  • debrota's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 11 months ago #199527 by debrota
Replied by debrota on topic get_session_key throws exception
I've not installed any plugins. I set 'debug'=>2 in application/config/config.php file. I didn't uncomment this line:
// 'runtimePath'=>'/var/limesurvey/runtime/'
Do I need to somehow "restart" the LimeSurvey application after modifying config.php?
My PHP program addLSparticipant.PHP still returns exactly the same error message.
I don't know where to look for LimeSurvey application error logs. I can see access logs to my website with POST requests to /limesurvey/index.php/admin/remotecontrol following GET requests to my /limesurvey/admin/addLSparticipant.php file
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 11 months ago #199529 by DenisChenu
Replied by DenisChenu on topic get_session_key throws exception

Hint: The file is saved by default to limesurvey/tmp/runtime/application.log, which is located in the LimeSurvey root folder.

I give you hint to get the error …

Since it's hard to see exact error with remote control i give you an advice to have error …

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.
  • debrota
  • debrota's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 11 months ago #199538 by debrota
Replied by debrota on topic get_session_key throws exception
My limesurvey/tmp/runtime directory contains only cache, HTML, and twig_cache directories, and a file index.html
I don't see an "application.log" file there , or in /limesurvey/application/logs folder
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 11 months ago #199543 by DenisChenu
Replied by DenisChenu on topic get_session_key throws exception
Did you update your config file with
Code:
'log' => array(
      'routes' => array(
        'fileError' => array(
          'class' => 'CFileLogRoute',
          'levels' => 'warning, error',
          'except' => 'exception.CHttpException.404',
        ),
      ),

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.
  • debrota
  • debrota's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 11 months ago #199550 by debrota
Replied by debrota on topic get_session_key throws exception

File Attachment:

File Name: config-per....php.txt
File Size:3 KB
The topic has been locked.
  • debrota
  • debrota's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 11 months ago #199551 by debrota
Replied by debrota on topic get_session_key throws exception
Does it matter that my config.php file is located in limesurvey/config ?
I don't see a limesurvey/application/config folder
Possibly LimeSurvey is not processing my config.php file?
How can I tell if it is?
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 11 months ago #199554 by DenisChenu
Replied by DenisChenu on topic get_session_key throws exception
No, the log part must be inside component , it clearly inside the comment in manual …

bin.shnoulle.net/?29c3310f57a972a2#3A5jt...sXLgGphBoo3LwHASo4qz

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.
  • debrota
  • debrota's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 11 months ago #199562 by debrota
Replied by debrota on topic get_session_key throws exception
OK, I have the 'log' section within 'components'. I still don't see an application.log file.
Please confirm locations in which I should have config.php and should see application.log appear.

I am still getting an exception thrown by jsonRPCClient.php on line 158... an "Uncaught Exception" said to be the result of "Incorrect response id (request id: 1, response id: )"
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 11 months ago #199569 by DenisChenu
Replied by DenisChenu on topic get_session_key throws exception
Then, no error from LimeSurvey ???

Did you activate the remote control ?

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.
  • debrota
  • debrota's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 11 months ago #199576 by debrota
Replied by debrota on topic get_session_key throws exception
Now something I did has totally broken LimeSurvey. I can't even get the admin screen to come up with my browser directed to:
debrota.com/limesurvey/index.php

Attached is the text in this file.

Also attached is text in:
debrota.com/limesurvey/config/internal.php

I don't recall trying to change either of these files from defaults.

my config.php file in limesurvey/config folder looks basically like the one you sent to me, only with my host and database credentials in it.

When I try to connect to LimeSurvey, I get an error from line 179 of index.php
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose