从PHP连接MongoDB Atlas的TLS / SSL问题

时间:2020-10-07 05:52:04

标签: php mongodb ssl mongodb-atlas

我正在尝试将我的PHP(CodeIgniter)应用程序连接到MongoDB Atlas。但是连接失败,原因是TLS握手失败:错误:1416F086:SSL例程:tls_process_server_certificate:证书验证失败。

我正在使用 -PHP 7.4.7(Codeigniter框架) -MongoDB扩展版本1.7.4 -Ubuntu 18.4 -Xampp

完整的错误日志是


Type: MongoDB\Driver\Exception\ConnectionTimeoutException

Message: No suitable servers found: `serverSelectionTimeoutMS` expired: [TLS handshake failed: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed calling ismaster on 'bohoz-shard-00-02.817p7.azure.mongodb.net:27017'] [TLS handshake failed: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed calling ismaster on 'bohoz-shard-00-01.817p7.azure.mongodb.net:27017'] [TLS handshake failed: error:1416F086:SSL routines:tls_process_server_certificate:

Filename: /home/rumaiz/MyWork/AAYUS/php_works/mvm-admin-portal/vendor/mongodb/mongodb/src/functions.php

Line Number: 431```

0 个答案:

没有答案