Yii:CMemCache需要加载PHP memcache扩展,尽管安装了memcache/memcached

Yii:CMemCache需要加载PHP memcache扩展,尽管安装了memcache/memcached,php,nginx,yii,yii1.x,Php,Nginx,Yii,Yii1.x,我已经通过运行sudo apt get install php memcached和运行安装了memcached,结果如下: 但我的Yii项目中仍然存在以下错误: 我正在nginx服务器上运行它。memcache和memcached是两个独立的扩展。您需要设置为true才能使用memcached: 'cache' => [ 'class' => 'CMemCache', 'useMemcached' => true, ], 或安装memcache扩展: s

我已经通过运行
sudo apt get install php memcached
和运行
安装了memcached,结果如下:

但我的Yii项目中仍然存在以下错误:


我正在nginx服务器上运行它。

memcache
memcached
是两个独立的扩展。您需要设置为
true
才能使用
memcached

'cache' => [
    'class' => 'CMemCache',
    'useMemcached' => true,
],
或安装
memcache
扩展:

sudo apt install php-memcache

如果答案对你有用,就要做标记,因为它可以帮助其他有同样问题的人。