& quot; SCRAM-SHA-1"身份验证机制需要使用--enable-ssl构建的libmongoc [英] The "SCRAM-SHA-1" authentication mechanism requires libmongoc built with --enable-ssl
问题描述
使用Laravel 5.4和Mongodb 3.6连接到数据库时获取错误消息
"SCRAM-SHA-1"身份验证机制要求使用--enable-ssl
它在具有相同版本的 ubuntu 16.04 中运行良好,但在 AWS Linux 中运行良好.
已安装的LAMP [php70,apach24]:
-
我们如何启用它?
解决方案错误,由于已禁用php-mongodb驱动程序中的
libmongoc SSL
和libmongoc Crypto
,并通过以下方式启用命令.sudo pecl7配置集php_ini/etc/php.ini
在安装mongodb驱动程序
sudo pecl7 install mongodb
之后,我们应该进行上述设置.现在运行正常.
Getting error message while connecting to database using Laravel 5.4 and Mongodb 3.6
The "SCRAM-SHA-1" authentication mechanism requires libmongoc built with --enable-ssl
Its running fine in ubuntu 16.04 with same versions, but not in AWS Linux.
Installed LAMP [ php70, apach24 ] :
Installed Mongodb [ 3.6 ] :
Installed php-mongodb driver for php7:
sudo yum -y install php7-pear php70-devel gcc // completed sudo pecl7 install mongodb // completed sudo yum install openssl-devel // completed
php-mongodb driver installed and updated to php.ini, mongodb shows in phpinfo() as well.
we find there is libmongoc ssl disabled from phpinfo, Is that issue ?
How can we enable it ?
解决方案Error, because of disabled
libmongoc SSL
andlibmongoc Crypto
from php-mongodb driver and enabled by following command.sudo pecl7 config-set php_ini /etc/php.ini
After installing mongodb driver
sudo pecl7 install mongodb
, we should set the above.now runs fine.
这篇关于& quot; SCRAM-SHA-1"身份验证机制需要使用--enable-ssl构建的libmongoc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!