z1x6f8
环境为lnmp, php为5.5.7,安装出现这个问题:
Problem 1- yiisoft/yii2-mongodb 2.1.2 requires ext-mongodb >=1.0.0 -> the requested PHP extension mongodb is missing from your system. - yiisoft/yii2-mongodb 2.1.1 requires ext-mongodb >=1.0.0 -> the requested PHP extension mongodb is missing from your system. - yiisoft/yii2-mongodb 2.1.0 requires ext-mongodb >=1.0.0 -> the requested PHP extension mongodb is missing from your system. - fancyecommerce/fecshop 1.0.0.9 requires yiisoft/yii2-mongodb ~2.1.0 -> satisfiable by yiisoft/yii2-mongodb[2.1.0, 2.1.1, 2.1.2]. - Installation request for fancyecommerce/fecshop 1.0.0.9 -> satisfiable by fancyecommerce/fecshop[1.0.0.9].
To enable extensions, verify that they are enabled in your .ini files:
- /alidata/server/php/etc/php.ini
You can also run
php --ini
inside terminal to see which files are used by PHP in CLI mode.
使用phpinfo函数,发现PHP环境中的模块中已经配置mongo,如下
MongoDB Support enabled
Version 1.6.14
Streams Support enabled
SSL Support enabled
Supported Authentication Mechanisms
MONGODB-CR enabled
SCRAM-SHA-1 enabled
MONGODB-X509 enabled
GSSAPI (Kerberos) disabled
PLAIN disabled
求解?@xiaoshenzhen 教程中下载的是mongo-1.6.14.tgz,这个是mongo的扩展,需要下载mongodb-1.2.5.tgz,这个才是php mongodb扩展
环境为lnmp, php为5.5.7,安装出现这个问题:
Problem 1- yiisoft/yii2-mongodb 2.1.2 requires ext-mongodb >=1.0.0 -> the requested PHP extension mongodb is missing from your system. - yiisoft/yii2-mongodb 2.1.1 requires ext-mongodb >=1.0.0 -> the requested PHP extension mongodb is missing from your system. - yiisoft/yii2-mongodb 2.1.0 requires ext-mongodb >=1.0.0 -> the requested PHP extension mongodb is missing from your system. - fancyecommerce/fecshop 1.0.0.9 requires yiisoft/yii2-mongodb ~2.1.0 -> satisfiable by yiisoft/yii2-mongodb[2.1.0, 2.1.1, 2.1.2]. - Installation request for fancyecommerce/fecshop 1.0.0.9 -> satisfiable by fancyecommerce/fecshop[1.0.0.9].
To enable extensions, verify that they are enabled in your .ini files:
- /alidata/server/php/etc/php.ini
You can also run
php --ini
inside terminal to see which files are used by PHP in CLI mode.
使用phpinfo函数,发现PHP环境中的模块中已经配置mongo,如下
MongoDB Support enabled
Version 1.6.14
Streams Support enabled
SSL Support enabled
Supported Authentication Mechanisms
MONGODB-CR enabled
SCRAM-SHA-1 enabled
MONGODB-X509 enabled
GSSAPI (Kerberos) disabled
PLAIN disabled
求解?找到问题了,你安装的是mongo的扩展,没有安装mongodb扩展,安装方式如下:
wget http://pecl.php.net/get/mongodb-1.2.5.tgz tar -zxf mongodb-1.2.5.tgz && cd mongodb-1.2.5 /usr/local/php/bin/phpize ./configure --with-php-config=/usr/local/php/bin/php-config make && make install
*php.ini中加入:
extension=mongodb.so
7.重启php
就ok了,使用PHPinfo函数,显示
mongodb和mongo两个模块- z1x6f8 回答了问题 安装mongodb一直安装不成功
找到问题了,你安装的是mongo的扩展,没有安装mongodb扩展,安装方式如下:
- wget http://pecl.php.net/get/mongodb-1.2.5.tgz
- tar -zxf mongodb-1.2.5.tgz && cd mongodb-1.2.5
- /usr/local/php/bin/phpize
- ./configure --with-php-config=/usr/local/php/bin/php-config
- make && make install
- *php.ini中加入:extension=mongodb.so
7.重启php
就ok了,使用PHPinfo函数,显示
mongodb和mongo两个模块
- z1x6f8 评论了扩展 Yii2 fecshop 电商开源项目
环境为lnmp, php为5.5.7,安装出现这个问题:
Problem 1- yiisoft/yii2-mongodb 2.1.2 requires ext-mongodb >=1.0.0 -> the requested PHP extension mongodb is missing from your system. - yiisoft/yii2-mongodb 2.1.1 requires ext-mongodb >=1.0.0 -> the requested PHP extension mongodb is missing from your system. - yiisoft/yii2-mongodb 2.1.0 requires ext-mongodb >=1.0.0 -> the requested PHP extension mongodb is missing from your system. - fancyecommerce/fecshop 1.0.0.9 requires yiisoft/yii2-mongodb ~2.1.0 -> satisfiable by yiisoft/yii2-mongodb[2.1.0, 2.1.1, 2.1.2]. - Installation request for fancyecommerce/fecshop 1.0.0.9 -> satisfiable by fancyecommerce/fecshop[1.0.0.9].
To enable extensions, verify that they are enabled in your .ini files:
- /alidata/server/php/etc/php.ini
You can also run
php --ini
inside terminal to see which files are used by PHP in CLI mode.
使用phpinfo函数,发现PHP环境中的模块中已经配置mongo,如下
MongoDB Support enabled
Version 1.6.14
Streams Support enabled
SSL Support enabled
Supported Authentication Mechanisms
MONGODB-CR enabled
SCRAM-SHA-1 enabled
MONGODB-X509 enabled
GSSAPI (Kerberos) disabled
PLAIN disabled
求解? - z1x6f8 回答了问题 安装mongodb一直安装不成功
问题解决了吗?