我有一个基于Drupal 7的项目,我在Ubuntu上安装了PHP7.4、Redis和PHP。我得到一个类'Predis\Client‘找不到错误。
模块的setting.php文件中的值如下。
$conf['redis_client_interface'] = 'Predis';
$conf['cache_backends'][] = 'sites/all/modules/redis/redis.autoload.inc';
$conf['cache_class_cache'] = 'Redis_Cache';
$conf['cache_class_cache_menu'] = 'Redis_Cache';
$conf['cache_class_cache_drupal_get_filename'] = 'Redis_Cache';
$conf['cache_class_cache_bootstrap'] = 'Redis_Cache';
$conf['cache_class_cache_path'] = 'Redis_Cache';
$conf['cache_class_cache_field'] = 'Redis_Cache';
$conf['cache_class_cache_views'] = 'Redis_Cache';
$conf['cache_class_cache_admin_menu'] = 'Redis_Cache';
$conf['lock_inc'] = 'sites/all/modules/redis/redis.lock.inc';当我运行drush cc时,会显示相同的错误。为了解决这个问题,我重新安装了Redis和php,但这还没有修复错误。
发布于 2022-08-26 11:29:36
如果要使用redis客户端接口Predis,则必须安装Predis库。Composer是推荐的安装方法,或者对于Drupal 7,您仍然可以使用库文件夹。请参阅模块文件夹中的README.Predis.txt。
如果您想使用Ubuntu包php- redis ,那么将redis客户端接口更改为PhpRedis。请参阅模块文件夹中的README.PhpRedis.txt。
https://drupal.stackexchange.com/questions/312705
复制相似问题