Problem getting JSON-RPC Interface to work

Mehr
3 Jahre 11 Monate her #102483 von polarbearcv
polarbearcv erstellte das Thema Problem getting JSON-RPC Interface to work
I enabled the JSON-RPC interface in the settings.
However if I browse to the url that it suggests I get an blank page.
https://myservername/limesurvey2/index.php/admin/remotecontrol

I also tried to use the PHP example from the manual

<?php
require_once 'jsonRPCClient.php';
define( 'LS_BASEURL', 'https://myservername/limesurvey2'); // adjust this one to your actual LimeSurvey URL
define( 'LS_USER', 'rpcuser' );
define( 'LS_PASSWORD', 'mypassword' );
// the survey to process
$survey_id=316154;
// instanciate a new client
$myJSONRPCClient = new jsonRPCClient( LS_BASEURL.'/admin/remotecontrol' );
// 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 );
?>


Then I get the following error

Warning: fopen(https://myservername/limesurvey2/admin/remotecontrol) [function.fopen]: failed to open stream: Connection timed out in /var/www/jsonrpcphp/includes/jsonRPCClient.php on line 132

Fatal error: Uncaught exception 'Exception' with message 'Unable to connect to https://myservername/limesurvey2/admin/remotecontrol' in /var/www/jsonrpcphp/includes/jsonRPCClient.php:140 Stack trace: #0 [internal function]: jsonRPCClient->__call('get_session_key', Array) #1 /var/www/jsonrpcphp/includes/rpctest.php(11): jsonRPCClient->get_session_key('rpcuser', 'mypassword') #2 {main} thrown in /var/www/jsonrpcphp/includes/jsonRPCClient.php on line 140


What im I doing wrong?
Marc.

Bitte Anmelden um an der Konversation teilzunehmen.

Jetzt loslegen!

Melden Sie sich jetzt an, und erstellen Sie in wenigen Minuten Ihre erste Umfrage.

Account einrichten

Abonnieren Sie unseren Newsletter

Abonnieren Sie unseren Newsletter für alle Neuigkeiten rund um LimeSurvey
captcha