1
Iはgithub.com/trougakoss/LimeSurvey limesurvay を使用していgithub.com/weberhofer/jsonrpcphpとコードとテストのために致命的なエラー:メッセージでキャッチされない例外 '例外' '誤った応答ID(要求ID:1)'
require_once 'C:/wamp/www/limesurvey/jsonrpcphp/src/org/jsonrpcphp/jsonRPCClient.php';
define('LS_BASEURL', 'http://10.10.10.29:823/limesurvey/index.php?r=admin/remotecontrol'); // adjust this one to your actual LimeSurvey URL
define('LS_USER', 'admin');
define('LS_PASSWORD', 'admin');
// the survey to process
$survey_id=989315;
// instanciate a new client
$myJSONRPCClient = new \org\jsonrpcphp\JsonRPCClient(LS_BASEURL);
//echo $myJSONRPCClient->getinfo();
// receive session key
$sessionKey= $myJSONRPCClient->get_session_key(LS_USER, LS_PASSWORD);
// receive all ids and info of groups belonging to a given survey
$groups = $myJSONRPCClient->list_groups($sessionKey, $survey_id);
print_r($groups, null);
// release the session key
$myJSONRPCClient->release_session_key($sessionKey);
と、これらのエラーをgetingです:出力結果
(!) Fatal error: Uncaught exception 'Exception' with message 'Incorrect response id: (request id: 1)' in C:\wamp\www\limesurvey\jsonrpcphp\src\org\jsonrpcphp\JsonRPCClient.php on line 185
(!) Exception: Incorrect response id: (request id: 1) in C:\wamp\www\limesurvey\jsonrpcphp\src\org\jsonrpcphp\JsonRPCClient.php on line 185
Call Stack
# Time Memory Function Location
1 1.0022 252616 {main}() ..\test.php:0
2 1.0032 295944 org\jsonrpcphp\JsonRPCClient->get_session_key() ..\test.php:25
3 1.0032 296360 org\jsonrpcphp\JsonRPCClient->__call() ..\test.php:25