從phpinfo()函數: phpinfo, memcache is loaded錯誤消息:「MemCache需要加載PHP memcache擴展。」遷移後。
然而,當我嘗試遷移,顯示此錯誤:
Exception 'yii\base\InvalidConfigException' with message 'MemCache requires PHP memcache extension to be loaded.'
in /Library/WebServer/Documents/r2d2/vendor/yiisoft/yii2/caching/MemCache.php:217
Stack trace:
#0 /Library/WebServer/Documents/r2d2/vendor/yiisoft/yii2/caching/MemCache.php(113): yii\caching\MemCache->getMemcache()
#1 /Library/WebServer/Documents/r2d2/vendor/yiisoft/yii2/base/Object.php(107): yii\caching\MemCache->init()
#2 [internal function]: yii\base\Object->__construct(Array)
#3 /Library/WebServer/Documents/r2d2/vendor/yiisoft/yii2/di/Container.php(372): ReflectionClass->newInstanceArgs(Array)
#4 /Library/WebServer/Documents/r2d2/vendor/yiisoft/yii2/di/Container.php(151): yii\di\Container->build('yii\\caching\\Mem...', Array, Array)
#5 /Library/WebServer/Documents/r2d2/vendor/yiisoft/yii2/BaseYii.php(344): yii\di\Container->get('yii\\caching\\Mem...', Array, Array)
#6 /Library/WebServer/Documents/r2d2/vendor/yiisoft/yii2/di/ServiceLocator.php(133): yii\BaseYii::createObject(Array)
#7 /Library/WebServer/Documents/r2d2/vendor/yiisoft/yii2/db/Schema.php(275): yii\di\ServiceLocator->get('cache', false)
#8 /Library/WebServer/Documents/r2d2/vendor/yiisoft/yii2/db/Migration.php(71): yii\db\Schema->refresh()
#9 /Library/WebServer/Documents/r2d2/vendor/yiisoft/yii2/base/Object.php(107): yii\db\Migration->init()
#10 /Library/WebServer/Documents/r2d2/vendor/yiisoft/yii2/console/controllers/MigrateController.php(113): yii\base\Object->__construct(Array)
#11 /Library/WebServer/Documents/r2d2/vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(491): yii\console\controllers\MigrateController->createMigration('m170316_221710_...')
#12 /Library/WebServer/Documents/r2d2/vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(129): yii\console\controllers\BaseMigrateController->migrateUp('m170316_221710_...')
#13 [internal function]: yii\console\controllers\BaseMigrateController->actionUp(0)
#14 /Library/WebServer/Documents/r2d2/vendor/yiisoft/yii2/base/InlineAction.php(55): call_user_func_array(Array, Array)
#15 /Library/WebServer/Documents/r2d2/vendor/yiisoft/yii2/base/Controller.php(151): yii\base\InlineAction->runWithParams(Array)
#16 /Library/WebServer/Documents/r2d2/vendor/yiisoft/yii2/console/Controller.php(91): yii\base\Controller->runAction('', Array)
#17 /Library/WebServer/Documents/r2d2/vendor/yiisoft/yii2/base/Module.php(455): yii\console\Controller->runAction('', Array)
#18 /Library/WebServer/Documents/r2d2/vendor/yiisoft/yii2/console/Application.php(167): yii\base\Module->runAction('migrate', Array)
#19 /Library/WebServer/Documents/r2d2/vendor/yiisoft/yii2/console/Application.php(143): yii\console\Application->runAction('migrate', Array)
#20 /Library/WebServer/Documents/r2d2/vendor/yiisoft/yii2/base/Application.php(375): yii\console\Application->handleRequest(Object(yii\console\Request))
#21 /Library/WebServer/Documents/r2d2/yii(27): yii\base\Application->run()
#22 {main}
有人能幫助我找出原因?
謝謝!
....也許嘗試安裝memcache擴展? – Farkie