Welcome to the LimeSurvey Community Forum

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

Encrypt MS SQL connection using SSL

  • Juseanma_117558
  • Juseanma_117558's Avatar Topic Author
  • Visitor
  • Visitor
5 years 6 months ago #174062 by Juseanma_117558
Encrypt MS SQL connection using SSL was created by Juseanma_117558
Hi all,

does anybody know how to encrypt the connection to my SQL Server 2016 with SSL?

I know this is more a Yii framework question but I almost spent a whole day and I still have no idea.

Thanks :)
The topic has been locked.
More
5 years 6 months ago - 5 years 6 months ago #174087 by jelo
Replied by jelo on topic Encrypt MS SQL connection using SSL
I'm using LimeSurvey with MS SQLServer, so I cannot test my recommendation ;-)

SQL Server are using certain flags, which enforce encryption and cert checking.

Encrypt-Specifies whether the communication with SQL Server is encrypted (1 or TRUE) or unencrypted (0 or FALSE).

TrustServerCertificate - Specifies whether the client should trust (1 or TRUE) or reject (0 or FALSE) a self-signed server certificate.


The complete options:
docs.microsoft.com/en-us/sql/connect/php...view=sql-server-2016


A simple PHP code would look like this:
Code:
$connectionInfo = array( "Database"=>"DbName",
                         "UID"=>"UserName",
                         "PWD"=>"Password",
                         "Encrypt"=>true,
                         "TrustServerCertificate"=>false);
$conn = sqlsrv_connect( $serverName, $connectionInfo);

secure.php.net/manual/en/ref.pdo-sqlsrv.connection.php
docs.microsoft.com/en-us/sql/connect/php...view=sql-server-2016

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Last edit: 5 years 6 months ago by jelo.
The following user(s) said Thank You: DenisChenu, Juseanma_117558
The topic has been locked.
  • Juseanma_117558
  • Juseanma_117558's Avatar Topic Author
  • Visitor
  • Visitor
5 years 6 months ago #174091 by Juseanma_117558
Replied by Juseanma_117558 on topic Encrypt MS SQL connection using SSL
Hi Jelo,

thanks for the answer. You are totaly right. I had the solution right in front of my eyes but I insert the Encrypt => true, on the wrong place... Wasted a couple of hours -.-

Thanks :)
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose