尝试重新为Magento安装建立索引时出现命令提示符错误


Command Prompt error while trying to reindex a Magento installation

我正在读一本关于Magento 2系统的书。运行以下命令时出现错误:

c:'xampp'htdocs'packt'bin>php magento indexer:info

致命错误:未捕获错误:调用C:''examplep''htdocs''packt''vendor''Magento''Framework''Event''Manager.php:56 中未定义的函数Magento''Framework''Event''mb_strtlower()

堆栈跟踪:0 C:''examplep''htdocs''packt''var''generation''Magento''Framework''Event''Manager''Proxy.php(95):Magento''Framework''Ivent''Manager->dispatch('core_collection…',Array)1 C:''examplep''htdocs''packt''vendor''magento''framework''Model''ResourceModel''Db''Collection''AbstractCollection.php(531):magento''framework''Event''Manager''Proxy->dispatch('core_Collection…',Array)2 C:''examplep''htdocs''packt''vendor''magento''framework''Data''Collection''AbstractDb.php(562):magento''framework''Model''ResourceModel''Db''Collection''AbstractCollection->_beforeLoad()3 C:''examplep''htdocs''packt''vendor''magento''framework''Data''Collection''AbstractDb.php(550):magento''framework''Data''Abstract Db->loadWithFilter(false,false)4 C:''examplep''htdocs''packt''vendor''magento''framework''Data''Collection.php(333):magento''framework''Data''Collection''AbstractDb->load()5 C:''xamplep''htdocs''packt''vendor''magento''modul在C:''xamplep ''htdocs ''packt''vendor ''magento''framework''Event''Manager.php中,位于第56行

看起来php中没有mb_string扩展。

要启用扩展,只需按照php.ini 中的行取消注释即可

extension=php_mbstring.dll