Remote control API get sessionKey

More
1 month 19 hours ago #171283 by MadhuraBL
MadhuraBL created the topic: Remote control API get sessionKey
How to connect to LimeSurvey RC from a different server?

I have tried the PHP Example in https://manual.limesurvey.org/RemoteControl_2_API#Example_and_helper in my local instance to export responses and it works perfectly fine. (limesurvey and PHP client application both in Local machine)

I have now copied the script to my PHP client application in a Test server and trying to connect to Limesurvey in a different Test server; and I am unable to get the session key from LimeSurvey.

I have updated the filename, base URLs, username and passwords for the Test instances. Not sure If it is something to do with "https" in the URL? URL for Local instance was "http". Because the script breaks at get_session_key line.

Any help with this will be appreciated!

Please Log in or Create an account to join the conversation.

More
1 month 1 hour ago #171358 by DenisChenu
DenisChenu replied the topic: Remote control API get sessionKey
There are no difference on script.

But : your server can be unreachable by the script. Maybe your hoster disable such script for example.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

More
3 weeks 2 days ago - 3 weeks 2 days ago #171642 by MadhuraBL
MadhuraBL replied the topic: Remote control API get sessionKey
Hi, Thanks for your reply.

I checked with our IT team today, they checked for proxy settings, SELinux settings, permissions, firewall and networking settings and everything seems to be fine.

I tried to execute the script from command line using curl, and I get curl error
:

curl: (60) Peer's Certificate has expired.
More details here: curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.

I tried curl with -k option, and I get PHP error:


PHP Fatal error: Uncaught exception 'Exception' with message 'Unable to connect to https://my-limesurvey-test/index.php/admin/remotecontrol' in /var/www/html/vendor/weberhofer/jsonrpcphp/src/org/jsonrpcphp/JsonRPCClient.php:155
Last Edit: 3 weeks 2 days ago by MadhuraBL.

Please Log in or Create an account to join the conversation.

More
3 weeks 2 days ago - 3 weeks 1 day ago #171648 by DenisChenu
DenisChenu replied the topic: Remote control API get sessionKey
$ wget https://hsu-ls-test.example.edu.au
 
…
 
--2018-07-24 08:38:32--  (essai :  7)  https://hsu-ls-test.example.edu.au/
Connexion à hsu-ls-test.imb.uq.edu.au (hsu-ls-test.imb.uq.edu.au)|130.102.116.207|:443… échec : Connexion terminée par expiration du délai d'attente.
Nouvel essai.
 
--2018-07-24 08:40:48--  (essai :  8)  https://hsu-ls-test.example.edu.au/
Connexion à hsu-ls-test.imb.uq.edu.au (hsu-ls-test.imb.uq.edu.au)|130.102.116.207|:443… échec : Connexion terminée par expiration du délai d'attente.
Nouvel essai.
Fix this before …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Last Edit: 3 weeks 1 day ago by DenisChenu.
The following user(s) said Thank You: LouisGac

Please Log in or Create an account to join the conversation.

More
3 weeks 1 day ago #171698 by MadhuraBL
MadhuraBL replied the topic: Remote control API get sessionKey
Hi, Thanks for the reply. Our test server is accessible within our company network only and so this connection time out error. I have asked my IT to renew SSL cert and hopefully after that the script will work. Will let you know.
Thanks again for the support.
And, just wondering if you can rename the links in your reply?? Thanks..

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!