Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/69.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
mongo php库安装错误_Php_Mongodb - Fatal编程技术网

mongo php库安装错误

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

我有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 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*||"`