Welcome to the LimeSurvey Community Forum

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

Problem with JSON installation and seemingly SSL

  • erichn
  • erichn's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 year 7 months ago #231687 by erichn
Running LimeSurvey-installation with JSON and PHP is migrated (copied) to new root-server. New LimeSurvey runs fine, but when using our HTML(PHP)-application with some RPC2 calls I get this message:

Warning: fopen(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /var/www/vhosts/xxx.de/httpdocs/b/f/jsonRPCClient.php on line 133

Warning: fopen(): Failed to enable crypto in /var/www/vhosts/xxx.de/httpdocs/b/f/jsonRPCClient.php on line 133

Warning: fopen( www.xxx.de/q/index.php/admin/remotecontrol ): Failed to open stream: operation failed in /var/www/vhosts/xxx.de/httpdocs/b/f/jsonRPCClient.php on line 133

Fatal error: Uncaught Exception: Unable to connect to www.xxx.de/q/index.php/admin/remotecontrol context:Resource id #6 in /var/www/vhosts/xxx.de/httpdocs/b/f/jsonRPCClient.php:144 Stack trace: #0 /var/www/vhosts/xxx.de/httpdocs/b/f/survey-list.php(48): jsonRPCClient->__call() #1 {main} thrown in /var/www/vhosts/xxx.de/httpdocs/b/f/jsonRPCClient.php on line
144


The server runs only LimeSurvey and our own application. JSON/RPC2 is called by PHP and works fine on the old server. The problem occurs immediately when calling

$myJSONRPCClient = new jsonRPCClient( LS_BASEURL.'/index.php/admin/remotecontrol' );

SSL-Certificate for the domain is active, but none for webmail. We don't plan to use mail on that server (I even didn't know that certificates for mail exist and didn't need some on the old server).

Could someone please tell me

- if RPC2 might use some mail-function?
- if installing an additional certificate for mail might solve my problem?
- if there is some other point I could look at?

Many thanks in advance,
Erich

 

Please Log in to join the conversation.

More
1 year 7 months ago #231699 by jelo

SSL-Certificate for the domain is active, but none for webmail. We don't plan to use mail on that server (I even didn't know that certificates for mail exist and didn't need some on the old server).
 
Why are you focusing on webmail or mail? I may overlooked something but the error message is saying that PHP is not able to verify the SSL certificate.  Which can be caused by many things.
The server where php is running is not correctly configured. The certificate itself is not installed correctly. Perhaps some certs in the chain are missing.
Since it is a new root server, I would first try to check if the cert chain is correct.  Sometimes clients like browser download missing certs in the background, which other clients are not doing.
E.g. via whatsmychaincert.com/

Other issues can be around transport-protocols SSL TLS versions. Newer root server configuration differ from old server.

www.php.net/manual/en/function.stream-socket-enable-crypto.php
www.php.net/manual/en/context.ssl.php
Depends on your PHP code. You might try to suppress the check SSL-certs to see where the issue is.

 

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Please Log in to join the conversation.

  • erichn
  • erichn's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 year 7 months ago #231737 by erichn
Big surprise - it was my mistake. Plesk asked me for a .pem-file and I had to paste it myself from a .key-file and two .cer-files. Used at first only one .cer-file and everything worked fine. Didn't really know, what I was doing and was happy until I used JSON.

Thank you very much!
Erich

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose