当前位置:论坛首页 > Linux面板 > 求助

【已解答】Error establishing a Redis connection

发表在 Linux面板2023-6-15 16:25 [复制链接] 2 7491

本帖最后由 堡塔运维香菜卷 于 2023-6-15 16:34 编辑

为了能快速了解并处理您的问题,请提供以下基础信息:
面板、插件版本:

系统版本:LIUX

问题描述:Error establishing a Redis connection
  
相关截图(日志、错误):
11.jpg

使用道具 举报 只看该作者 回复
发表于 2023-6-15 16:27:45 | 显示全部楼层
Stack trace:
#0 /www/wwwroot/www.ckxxwx.com/wp-content/object-cache.php(550): WP_Object_Cache->connect_using_predis(Array)
#1 /www/wwwroot/www.ckxxwx.com/wp-content/object-cache.php(256): WP_Object_Cache->__construct(false)
#2 /www/wwwroot/www.ckxxwx.com/wp-includes/load.php(750): wp_cache_init()
#3 /www/wwwroot/www.ckxxwx.com/wp-settings.php(131): wp_start_object_cache()
#4 /www/wwwroot/www.ckxxwx.com/wp-config.php(96): require_once('/www/wwwroot/ww...')
#5 /www/wwwroot/www.ckxxwx.com/wp-load.php(50): require_once('/www/wwwroot/ww...')
#6 /www/wwwroot/www.ckxxwx.com/wp-blog-header.php(13): require_once('/www/wwwroot/ww...')
#7 /www/wwwroot/www.ckxxwx.com/index.php(17): require('/www/wwwroot/ww...')
#8 {main}" while reading response header from upstream, client: 116.21.21.51, server: www.ckxxwx.com, request: "GET /112851.html HTTP/2.0", upstream: "fastcgi://unix:/tmp/php-cgi-72.sock:", host: "www.ckxxwx.com", referrer: "https://m.baidu.com/"
2023/06/15 16:20:19 [error] 11607#0: *14550 FastCGI sent in stderr: "PHP message: Exception: Predis library not found. Re-install Redis Cache plugin or delete the object-cache.php. in /www/wwwroot/www.ckxxwx.com/wp-content/object-cache.php:860
Stack trace:
#0 /www/wwwroot/www.ckxxwx.com/wp-content/object-cache.php(550): WP_Object_Cache->connect_using_predis(Array)
#1 /www/wwwroot/www.ckxxwx.com/wp-content/object-cache.php(256): WP_Object_Cache->__construct(false)
#2 /www/wwwroot/www.ckxxwx.com/wp-includes/load.php(750): wp_cache_init()
#3 /www/wwwroot/www.ckxxwx.com/wp-settings.php(131): wp_start_object_cache()
#4 /www/wwwroot/www.ckxxwx.com/wp-config.php(96): require_once('/www/wwwroot/ww...')
#5 /www/wwwroot/www.ckxxwx.com/wp-load.php(50): require_once('/www/wwwroot/ww...')
#6 /www/wwwroot/www.ckxxwx.com/wp-blog-header.php(13): require_once('/www/wwwroot/ww...')
#7 /www/wwwroot/www.ckxxwx.com/index.php(17): require('/www/wwwroot/ww...')
#8 {main}" while reading response header from upstream, client: 101.67.29.157, server: www.ckxxwx.com, request: "GET /125426.html HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi-72.sock:", host: "www.ckxxwx.com"
2023/06/15 16:20:19 [error] 11607#0: *14552 FastCGI sent in stderr: "PHP message: Exception: Predis library not found. Re-install Redis Cache plugin or delete the object-cache.php. in /www/wwwroot/www.ckxxwx.com/wp-content/object-cache.php:860
Stack trace:

使用道具 举报 回复 支持 反对
发表于 2023-6-15 16:34:22 | 显示全部楼层
您好,这个错误通常表示在WordPress网站中使用的Redis缓存插件需要Predis库,但无法找到该库。
要解决此问题,你可以尝试以下解决方法:

1、安装Predis库:Predis是一个PHP客户端库,用于与Redis服务器进行通信。确保在你的WordPress网站的服务器上安装了Predis库。你可以使用Composer进行安装,或者根据你的环境手动安装Predis库。

使用Composer安装Predis库的命令如下:
  1. composer require predis/predis
复制代码

如果你已经安装了Predis库,确保它是最新版本,并检查是否在PHP配置中启用了Predis扩展。

2、重新安装Redis缓存插件:如果你已经安装了Redis缓存插件,请尝试重新安装它,以确保所有依赖项正确安装。

3、删除object-cache.php文件:根据错误消息的建议,你可以尝试删除WordPress网站根目录下的object-cache.php文件。这个文件是与Redis缓存插件相关的一个文件,删除它可能会解决问题。请确保在删除文件之前进行备份,以防需要恢复。

4、检查文件权限:确保object-cache.php文件和其他相关文件的权限正确设置,并确保Web服务器用户(如www-data或nginx)对这些文件具有适当的读取权限。
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

普通问题处理

论坛响应时间:72小时

问题处理方式:排队(仅解答)

工作时间:白班:9:00 - 18:00

紧急运维服务

响应时间:3分钟

问题处理方式:宝塔专家1对1服务

工作时间:工作日:9:00 - 18:30

宝塔专业团队为您解决服务器疑难问题

点击联系技术免费分析

工作时间:09:00至18:30

快速回复 返回顶部 返回列表