mongo php库安装错误
我有mongodb版本3.2.3和php mongo驱动程序版本1.6.12。我正在尝试使用composer进行安装mongo php库安装错误,php,mongodb,Php,Mongodb,我有mongodb版本3.2.3和php mongo驱动程序版本1.6.12。我正在尝试使用composer进行安装 $ composer require "mongodb/mongodb=^1.0.0" 得到了这个错误: Your version of PHP, 5.4.16, is affected by CVE-2013-6420 and cannot safely perform certificate validation, we strongly suggest you upgra
$ composer require "mongodb/mongodb=^1.0.0"
得到了这个错误:
Your version of PHP, 5.4.16, is affected by CVE-2013-6420 and cannot safely perform certificate validation, we strongly suggest you upgrade.
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
问题1
- mongodb/mongodb 1.0.1 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system.
- mongodb/mongodb 1.0.0 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system.
需要帮助来解决这个问题。我是否安装了错误版本的库?请大家分享我可以安装mongo php库的链接或命令
Your version of PHP, 5.4.16, is affected by CVE-2013-6420
您需要更新您的php版本。转到PHP7 对于以下PHP5.6 plz,请尝试以下方法:
$ pecl install mongodb
$ echo "extension=mongodb.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
或者根据您的php版本下载mongodb.so文件,并将其粘贴到php/ext文件夹中
有关mongo库和驱动程序兼容性的更多信息,请使用以下链接
$pecl安装mongodb
。在php.ini中添加extension=mongodb.so
。如果出现错误:sasl.h notfound
,您需要安装cyrus sasl-devel,如果php pear中出现错误,由于PHP5.6版本,您应该卸载php pear并安装php56w pear
$ pecl install mongodb
$ echo "extension=mongodb.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`