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
-
require和import的区别和详解
该用require还是import?
-
Vue methods 用箭头函数取不到 this
关于vue methods不能使用箭头函数的内容如下
-
input上传图片,获取图片上传尺寸
onchange触发,获取当前file对象(这里可以获取图片的大小、类型、修改时间等) reader去读取文件 塞到页面,获取图片的宽高 移出图片节点
-
flex水平平分布局
flex,水平,平分
-
flex 布局子内容p元素被撑开
父元素 flex 布局,子元素有一行文字,将其设置为不换行隐藏后显示省略号,但实际并不是想象的那样,而导致布局变形。改怎么办?
-
vue中computed源码,工作原理
(Obeject.defineProperty是Object的一个方法,第一个参数是对象名称,第二个参数是要设置的属性名,第三个参数是一个对象,它可以设置这个属性是否可修改、可写等,而这篇文章主要使用的是Obeject.defineProperty的访问器属性,感兴趣的朋友可以自行google或者查看Js高及程序设计)
-
computed失效不打印console
我们可以看上一篇computed的原理,来看为什么不打印console
-
Spring报错:has been injected into other beans [xxx] in its raw version as part of a circular reference
发现这样的错误,一般是循环引入service引起的,比如aService引入了bService,bService又引入了aService,就会循环引入,就出错了
-
Updating Homebrew... 更新了镜像依然卡死
使用brew install [软件包]安装软件包时,卡在Updating Homebrew... 或输入`brew update`更新brew,半天没反应.产生原因一般是在国内访问官方 更新源获取资源太慢,解决方案可以采用更换国内镜像更新源.
-
PHP - 将macOS系统下的PHP升级成最新版本(7.3),并设为默认
由于我当前使用的 Mac 电脑的 PHP 版本比较低(7.1.19),许多新特性和功能不支持,现准备将其升级成最新版(7.3.2),具体步骤如下。