php连接 sql server 数据库遇到了错误:error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol
muke
每日精进
muke
2022-05-23 14:24:30
1848
{{single.collect_count}}

打开修改文件:/etc/ssl/openssl.cnf
在第一行(或比较靠前的位置,如大概第 17 行往后)添加以下配置:

openssl_conf = default_conf

然后在其后面增加以下配置:

[default_conf]
ssl_conf = ssl_sect

[ssl_sect]
system_default = system_default_sect

[system_default_sect]
MinProtocol = TLSv1
CipherString = DEFAULT@SECLEVEL=1

注意 MinProtocol 这里,网上有的写的是 TLSv1.1 或者 TLSv1.0,经测试好像对我这都不管用,最后找到直接写 TLSv1 就可以成功了

回帖
全部回帖({{commentCount}})
{{item.user.nickname}} {{item.friend_time}}
{{item.content}}
{{item.comment_content_show ? '取消' : '回复'}} 删除
回帖
{{reply.user.nickname}} {{reply.friend_time}}
{{reply.content}}
{{reply.comment_content_show ? '取消' : '回复'}} 删除
回帖
收起
没有更多啦~
{{commentLoading ? '加载中...' : '查看更多评论'}}