英文搜索运行搜索索引时的问题

文档问题 · ganbugandong · 于 5年前 发布 · 1373 次阅读

两个问题:

  1. Windows上如果用cygwin运行,会提示路径找不到(有workaround)
Could not open input file: /cygdrive/f/PhpstormProjects/fecshop/vendor/fancyecommerce/fecshop/shell/search/../../../../../yii
There are Could not open input file: /cygdrive/f/PhpstormProjects/fecshop/vendor/fancyecommerce/fecshop/shell/search/../../../../../yii products to process
There are Could not open input file: /cygdrive/f/PhpstormProjects/fecshop/vendor/fancyecommerce/fecshop/shell/search/../../../../../yii pages to process

2.如果直接一行一行拷贝出来运行,会有下面这个错误(mac上也有这个错误),terminal已经用了服务器里的php,也就是安装了php-mongodb.dll的php

Exception 'Error' with message 'Class 'MongoDB\Driver\Manager' not found'

in F:\PhpstormProjects\fecshop\vendor\yiisoft\yii2-mongodb\src\Connection.php:356

Stack trace:
#0 F:\PhpstormProjects\fecshop\vendor\yiisoft\yii2-mongodb\src\Command.php(184): yii\mongodb\Connection->open()
#1 F:\PhpstormProjects\fecshop\vendor\yiisoft\yii2-mongodb\src\Command.php(357): yii\mongodb\Command->execute()
#2 F:\PhpstormProjects\fecshop\vendor\yiisoft\yii2-mongodb\src\Collection.php(153): yii\mongodb\Command->createIndexes('full_search_pro...', Array)
#3 F:\PhpstormProjects\fecshop\vendor\fancyecommerce\fecshop\services\search\MongoSearch.php(87): yii\mongodb\Collection->createIndex(Array, Array)
#4 [internal function]: fecshop\services\search\MongoSearch->actionInitFullSearchIndex()
#5 F:\PhpstormProjects\fecshop\vendor\fancyecommerce\fecshop\services\Service.php(54): call_user_func_array(Array, Array)
#6 F:\PhpstormProjects\fecshop\common\services\Search.php(48): fecshop\services\Service->__call('initFullSearchI...', Array)
#7 [internal function]: common\services\Search->actionInitFullSearchIndex()

共收到 1 条回复
Fecmall#15年前 0 个赞

1.Could not open input file: /cygdrive/f/PhpstormProjects/fecshop/vendor/fancyecommerce/fecshop/shell/search/../../../../../yii,那么你可以看看这个文件是否存在,如果没有存在,可能你没有在安装的时候执行 ./init (windows下执行yii.bat)

2.这个是您没有安装 php-mongodb扩展,可以 php -m看一下

添加回复 (需要登录)
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册
Your Site Analytics