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
-
QQ微信登录失败,报100044错
我用的mob的maven集成方案,说实在的从一开始用maven集成方案就是一个坑啊。每次build都会重新加载所有maven包,后来通过gradle offline总算解决了。
-
PHP JSON_ENCODE 不转义中文汉字的方法
PHP 生成JSON的时候,必须将汉字不转义为 \u开头的UNICODE数据。 网上很多,但是其实都是错误的,正确的方法是在json_encode 中加入一个参数 JSON_UNESCAPED_UNICODE
-
jquery ajax超时设置
原来ajax可以设置超时时间,那么简单,ajax还有更多功能,虽然不怎么用它,有时候还挺好用。
-
阿里云主机挂载硬盘
阿里云主机挂载硬盘
-
Linux统计文件夹占用空间大小--du命令基本用法
原来linux查看文件夹大小那么快,那么便捷
-
Android studio 三大模拟器比较,强烈推荐第三种
强烈建议夜神模拟器,快,兼容性好,so包不出错
-
Glide placeholder 圆角失效
解决办法,一种是不使用占位符,另外一种则是不使用默认动画。
-
php如何用代理访问网站 以及图片防盗链代理服务器
随着HTTPS的普吉,但是很多时候外联的图片却未开通HTTPS,那怎么办呢,我们只能做一个图片代理,来通过后台来绕过HTTPS请求HTTP图片的时候报错的麻烦