function _open should return true to avoid this error. It can not be null or empty whatever we use either database or file. When we use database to store session data, we keep it blank or no Boolean return. that is the main reason for this error. class session_handler{
public function __construct()
{
session_set_save_handler(
array($this, "_open"),
array($this, "_close"),
array($this, "_read"),
array($this, "_write"),
array($this, "_destroy"),
array($this, "_gc")
);
}
public function _open($savePath, $sessionId)
{
return true;
}
public function _close() { }
public function _read($id) { }
public function _write($id, $data) { }
public function _destroy($id) { }
public function _gc($max) { }}It is only for PHP 7. I do not know it is a bug or not. https://stackoverflow.com/questions/34125849/php-7-user-sessions-issue-failed-to-initialize-storage-module |
PHP 7 user sessions issue - Failed to initialize storage module
-
Laravel的Model在数据库更新时间比时间少8小时
操作发现laravel生成的数据库时间比北京时间少了八小时
-
Linux服务器防火墙规则iptables修改后无法保存
修改了iptables,不生效,然后没有效果。。。。service iptables start
-
如何查看jdk的版本是32位还是64位
今天遇到了jdk版本不适配的问题,查询网络发现了这两个方法。
-
RecyclerView数据增加后,adapter刷新后,出现空白的问题
list增加,但是只是item多了空白,数据并没有增长的问题
-
仿QQ长按弹出功能菜单
android app普遍常用的弹出上下文菜单是列表式的。QQ列表,在上方弹出冒泡效果菜单,如图
-
Android沉浸式状态栏实现及处理键盘弹出
做了晨侵式状态栏,然后发现键盘弹出遮挡住了EditText...,怎么办
-
用xml解决沉侵式,输入法遮挡输入框的方法
其实用xml属性就能解决,输入法遮挡输入框的方法
-
android EditText 改变光标的颜色
写好以后,发现光标是默认的红色有点难看啊
-
android 列表刷新排版错误
进行list列表增加修改数据,发现数据变的混乱,后来发现与缓存有关系。
-
用fastjson进行 list,String,json之间相互传换
用fastjson进行着写list,String,json之间的互相转化,真的是很方便。易与数据的操作。