& quot; SCRAM-SHA-1"身份验证机制需要使用--enable-ssl构建的libmongoc [英] The "SCRAM-SHA-1" authentication mechanism requires libmongoc built with --enable-ssl

查看:101
本文介绍了& quot; SCRAM-SHA-1"身份验证机制需要使用--enable-ssl构建的libmongoc的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Laravel 5.4和Mongodb 3.6连接到数据库时获取错误消息

"SCRAM-SHA-1"身份验证机制要求使用--enable-ssl

构建的libmongoc

它在具有相同版本的 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 and libmongoc 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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆