大家好, 根据教程配置fecshop , 运行时 mongodb 报错 , 如下: The 'cursor' option is required, except for aggregate with the explain argument
环境是本地 mamp
查看了百度是指 版本不兼容?
说详细一点,是安装过程的那部报错?还是安装完成了,访问某个url报错
另外报错信息都贴全,目前的信息太少,无法诊断问题
安装完成了的, 是访问url报错 报错信息是: MongoDB Exception – yii\mongodb\Exception The 'cursor' option is required, except for aggregate with the explain argument ↵ Caused by: MongoDB\Driver\Exception\RuntimeException The 'cursor' option is required, except for aggregate with the explain argument in /Applications/MAMP/htdocs/fecshop/vendor/yiisoft/yii2-mongodb/Command.php at line 186
那个url?能尽量多的给信息吗
您好,我查了一下,mongodb3.5以上,aggregate函数需要游标导致的问题,具体,https://segmentfault.com/q/1010000011478817
你可以先安装mongodb3.4,3.5的问题,等元旦回去在解决
先安装,mongodb3.4版本
好的! 非常感谢!
Yii2 mongodb 扩展修复: https://github.com/yiisoft/yii2-mongodb/commit/0ad02a4750474ffaf43262c7203cf83836fe88e1
您可以在fecshop根目录执行 composer update yiisoft/yii2-mongodb dev-master ,来获取yii2 mongodb扩展最新的版本。
composer update yiisoft/yii2-mongodb dev-master
然后在
出现 aggregate 函数的后面加上cursor参数,参考如图上面,试试,
我的mongodb还是3.2,还没有升级。升级后在看看。
打开 根目录的composer.json ,在require中添加
"require": { "yiisoft/yii2-mongodb": "dev-master", ... }
然后执行 composer update
composer update
已经升级mongodb3.6,没啥问题:https://fecshop.appfront.fancyecommerce.com/special-occasion
下个自版本将会更新这个
你好 根据操作, 出现报错如图:
@yishun1006 #10楼
mongodb3.6版本的问题已经修复,发布了新版本,详细参看:
http://www.fecshop.com/topic/556
@yishun1006 #10楼 稍等一下,还有问题
参看 1.2.2.8: http://www.fecshop.com/topic/556