Non-static method Redis::hSet() cannot be called statically
来源:互联网 发布:sql删除重复保留唯一 编辑:程序博客网 时间:2024/06/06 03:31
今天配置服务器的时候发现本来能运行的代码出bug了,laravel日志文件报错Non-static method Redis::hSet() cannot be called statically。
google了一下这个问题,大多数人的解决方法是use Redis改为use Illuminate\Support\Facades\Redis。
这种方法虽然能解决问题,但一改一大堆,不是个好的解决办法。细研究一阵后发现可能是PHP自带了redis拓展和predis冲突了,但是在php.ini配置文件中没有找到redis的相关信息,最后在/etc/php.d/redis.ini和php-zts.d/redis.ini中找到了:
; Enable redis extension moduleextension = redis.so; phpredis can be used to store PHP sessions. ; To do this, uncomment and configure below;session.save_handler = redis;session.save_path = "tcp://host1:6379?weight=1, tcp://host2:6379?weight=2&timeout=2.5, tcp://host3:6379?weight=2"
供参考
阅读全文
1 0
- Non-static method Redis::hSet() cannot be called statically
- laravel redis 扩展冲突的问题分析:Fatal error: Non-static method Redis::keys() cannot be called statically
- php错误:non-static method xxx()should not be called statically
- Strict standards: Non-static method cls_image::gd_version() should not be called statically in
- Non-static method cls_image::gd_version() should not be called statically in D:\X\www\ecshop\install
- ECMall报Strict Standards: Non-static method Conf::get() should not be called statically解决
- ecshop二次开发:Non-static method cls_image::gd_version() should not be called statically in的解决
- 安装ECShop报 Non-static method cls_image::gd_version() should not be called statically 解决方案
- 安装ecmall报错Strict Standards: Non-static method ECMall::startup() should not be called statically in D
- Non-static method cannot be referenced from a static context
- ECshop安装问题一解决:Strict Standards: Non-static method cls_image::gd_version() should not be called stati
- reference to non-static member function must be called
- 记录no static method cannot be reference
- Cannot make a static reference to the non-static method
- Cannot make a static reference to the non-static method
- Cannot make a static reference to the non-static method
- future method cannot be called from a future or batch method
- non-static method
- String相关知识点
- ionic用插件(cordova-plugin-baidumaplocation)定位并调百度地图在上面显示
- android 动画 过渡动画 transition
- MTK6735 竖屏横用、旋转90度、MTK_LCM_PHYSICAL_ROTATION
- mvc——从客户端(content="<p> &nb...")中检测到有潜在危险的 Request.Form
- Non-static method Redis::hSet() cannot be called statically
- 对于结构伪类选择器
- Android访问网页的两种方式
- 安卓开发入门基础一
- 第一阶段第十天(数组排序(二维),双色球,杨辉三角)
- UML建模设计图
- iOS-导航栏,类似淘宝“我的淘宝”导航栏
- python的webrtc库实现语音端点检测
- 给js对象添加新属性的方法