***报错Class 'Redis' not found in(原创)
报错:Class 'Redis' not found in
这个报错,表明phpredis 扩展没有安装好,而不是redis没有安装
有没有安装成功这个扩展,可以通过phpinfo来查看。
解决问题的方法:
安装phpredis扩展
我自己安装的是宝塔Linux
首先下载phpredis,下载地址:https://github.com/nicolasff/phpredis/archive/2.2.4.tar.gz
上传phpredis-2.2.4.tar.gz到/usr/local/src目录 (宝塔Linux的目录应该是:/www/server/php/56/include/php/ext/phpredis, phpredis这个目录是自己创建的 )
cd /usr/local/src #进入软件包存放目录 (宝塔Linux的目录应该是:/www/server/php/56/include/php/ext/phpredis )
tar zxvf phpredis-2.2.4.tar.gz #解压
cd phpredis-2.2.4 #进入安装目录 (宝塔Linux的安装目录应该是:/www/server/php/56/include/php/ext/phpredis )
/usr/local/php/bin/phpize #用phpize生成configure配置文件 (宝塔Linux的命令应该是:/www/server/php/56/bin/phpize )
./configure --with-php-config=/usr/local/php/bin/php-config #配置 (宝塔Linux的命令应该是:./configure --with-php-config=/www/server/php/56/bin/php-config )
make #编译
make install #安装 (也可以合成一步:make && make install )
安装完成之后,出现下面的安装路径
/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/
(宝塔linux出现的是: Installing shared extensions: /www/server/php/56/lib/php/extensions/no-debug-non-zts-20131226/ )
***报错Class 'Redis' not found in(原创)的更多相关文章
- 【Redis】【报错】redis.exceptions.ResponseError: DENIED Redis is running in protected mode
(一)报错前提 写flask 项目的时候,因为连接了私有云中的redis地址指定了IP host,启动项目的时候报错 (二)解决方法 首先要切换到root用户 root@:/etc/redis# pw ...
- 项目启动报错:Redis health check failed
最近是重新开发整个项目,在上线测试的时候发现这个问题. 项目环境:SpringBoot2.x+Consul+Redission+Maven 报错的信息如下: o.s.b.a.redis.RedisHe ...
- docker启动redis报错 oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
docker启动redis报错 1:C 17 Jun 08:18:04.613 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo1:C 17 Jun 08 ...
- .Net Core redis 调用报错 '6000 Redis requests per hour' 解决 6000 此调用限制
问题描述 redis 是一种基于内存,性能高效的 NoSQL 数据库,性能高主要就体现在数据交互耗时较短,能够段时快速的对用户的请求做出反应,所以在业务比较复杂或交互量需求大时,必然会超过 6000次 ...
- jedisCluster 报错: redis.clients.jedis.exceptions.JedisClusterException: No way to dispatch this command to Redis Cluster because keys have different slots.
根本原因:jedisCluster不支持mget/mset等跨槽位的操作. 版本:2.9.0 解决办法,推荐更改redis的驱动修改为: lettuce lettuce 项目地址:https://gi ...
- LogStash启动报错:<Redis::CommandError: ERR unknown command 'script'>与batch_count 的 配置
环境条件: 系统版本:centos 6.8 logstash版本:6.3.2 redis版本:2.4 logstash input配置: input { redis { host => &qu ...
- Redis报错:redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snap
首先找到出现错误的原因: redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but ...
- phpredis 报错 “Function Redis::setTimeout() is deprecated” 解决方法
项目在本地开发过程中抛出异常: Function Redis::setTimeout() is deprecated 找到出错代码: <?php use Illuminate\Support\F ...
- redis 启动配置文件加载报错 service redis does not support chkconfig
# chkconfig: # description:Redis is a persistent key-value database 网上资料 上面的注释的意思是,redis服务必须在运行级2,3, ...
随机推荐
- bzoj 3669: [Noi2014]魔法森林 (LCT)
链接:https://www.lydsy.com/JudgeOnline/problem.php?id=3669 题面: 3669: [Noi2014]魔法森林 Time Limit: 30 Sec ...
- How to expand Azure VM OS Disk
There are three main disk roles in Azure: the data disk, the OS disk, and the temporary disk. 1. OS ...
- request 获取body内容
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException ...
- Qt: usb热插拔检测(windows);
Qt提供了QAbstractNativeEventFilter来实现本地时间得过滤,通过对本地事件的检测,判断usb热插拔:(这里是windows 的例子); 首先,以QWidget, QAbstra ...
- python模拟蒙特·卡罗法计算圆周率
蒙特·卡罗方法是一种通过概率来得到问题近似解的方法,在很多领域都有重要的应用,其中就包括圆周率近似值的计问题. 假设有一块边长为2的正方形木板,上面画一个单位圆,然后随意往木板上扔飞镖,落点坐标(x, ...
- java 多线程 synchronized与lock的通信机制等问题,结合相应实例说明
1. 利用多线程实现如下需求: 写两个线程,一个线程打印1~52,另一个线程打印A~Z,打印顺序是12A34B...5152Z: 2. 使用synchronized 实现 public class T ...
- 友盟统计单页面应用vue
根据友盟官方提示在index.html的body标签末尾加入相关代码后: 后来发现,由于项目为单页面应用,在路由发生跳转时(到其他页面了),并不会重新将新页面加入统计中.需要在App.vue页面中,监 ...
- vue.js学习系列-第二篇
一 VUE实例生命周期钩子 1 生命周期函数 定义 生命周期函数就是vue在某一时间点自动执行的函数 2 具体函数 1 new vue() 2 before ...
- 转:jsp与servlet的区别与联系
jsp与servlet的区别与联系 - gsyabc - 博客园https://www.cnblogs.com/sanyouge/p/7325656.html jsp和servlet的区别和联系:1. ...
- CNN卷积神经网络
import os # third-party library import torch import torch.nn as nn import torch.utils.data as Data i ...