刚开始一直报500错误,页面不提示,也没想着去查看日志文件。好几天了,一看日志,发现是这个问题。问了一下,是session的问题、

2017/07/25 16:57:49 [error] 2300#0: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught exception 'yii\base\ErrorException' with message 'session_write_close(): open(/var/lib/php/session/sess_itrssn0785o64bpt6b9n2utl91, O_RDWR) failed: Permission denied (13)' in /mnt/hgfs/UnknownBlog/vendor/yiisoft/yii2/web/Session.php:187
Stack trace:
#0 [internal function]: yii\base\ErrorHandler->handleError(2, 'session_write_c...', '/mnt/hgfs/Unkno...', 187, Array)
#1 /mnt/hgfs/UnknownBlog/vendor/yiisoft/yii2/web/Session.php(187): session_write_close()
#2 [internal function]: yii\web\Session->close()
#3 {main}
thrown in /mnt/hgfs/UnknownBlog/vendor/yiisoft/yii2/web/Session.php on line 187" while reading response header from upstream, client: 192.168.1.102, server: admin.blog.org, request: "GET /login/index HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "admin.blog.org", referrer: "http://admin.blog.org/login/index"

关于这个错误,是session权限问题

在index.php 打印phpinfo();查看session的目录

然后给session设置777权限;解决

chmod -R  /var/lib/php/session

关于session报错问题。的更多相关文章

  1. CodeIgniter 3.0+ 部署linux环境 session报错

    codeigniter Message: mkdir(): Invalid path Filename: drivers/Session_files_driver.php 看起来像权限问题,在默认情况 ...

  2. ASP.NET Global Application_Error事件中访问Session报错 解决

    报错信息:会话状态在此上下文中不可用 protected void Application_Error(object sender, EventArgs e) { //以此判断是否可用Session ...

  3. .NET CORE 使用Session报错:Session has not been configured for this application or request

    报错信息:Session has not been configured for this application or request 解决方案:在Startup.cs文件中的Configure方法 ...

  4. C#一般处理程序 ashx.cs使用Session报错问题

    HttpContext.Current.Session["UserID"].ToString();//报错,报Session为Null, 此时需要添加引用和继承IRequiresS ...

  5. springboot集成redis使用redis作为session报错ClassNotFoundException类RememberMeServices

    springboot 集成redis使用redis作为缓存,会报错的问题. 错误信息: java.lang.IllegalStateException: Error processing condit ...

  6. C#一般处理程序设置和读取session(session报错“未将对象引用设置到对象的实例”解决)

    登陆模块时,用到了session和cookie.在一般处理程序中处理session,一直报错.最后找到问题原因是需要调用 irequiressessionstate接口. 在ashx文件中,设置ses ...

  7. django使用session报错:no such table: django_session

    Django版本:1.11.15 使用session的代码:request.session['key'] = value 运行后报错:no such table: django_session 解决办 ...

  8. 踩坑记录-用koa-session设置session报错

    报如下错误: 原因 设置signed: true后,它就会寻找req.secret(一个秘钥字符串),进行加密 allen返回浏览器. const SESS_CONFIG = { key: 'kkb: ...

  9. spring boot集成shiro-redis时,分布式根据seesionId获取session报错排查总结

    昨天在集成shiro-redis的时候,使用sessionId在其他微服务获取用户的session时,发生错误:There is no session with id [xxx]. 查遍了所有资料,基 ...

随机推荐

  1. Dependency Injection in ASP.NET Web API 2 Using Unity

    What is Dependency Injection? A dependency is any object that another object requires. For example, ...

  2. Eclipse变量名自动补全问题 自定义上屏按键为TAB

    Eclipse空格等号等都可以上屏,这样有时候输入变量名再按空格就会自动补全,非常讨厌.那么怎么办呢? 1.首先你的Eclipse需要装有 Eclipse plug-in development en ...

  3. 开源推荐系统Librec中recommender模块算法了解——cf模块

    1.      k近邻(k-NearestNeighbor)算法介绍及在推荐系统中的应用 https://zhuanlan.zhihu.com/p/25994179 k近邻(k-NearestNeig ...

  4. CSS3d 基础

    -webkit-transform-style:-webkit-preserve-3d;//设置3D转换 translateX:px; 平移 translateY:px; translateZ:px; ...

  5. HTML 标签元素的 align 属性

    align 属性规定段落中文本的对齐方式. 有 left  right center  justify 这些参数 left  right center  就是左对齐 右对齐 中间对齐 justify  ...

  6. WebConfig配置讲解

    http://www.cnblogs.com/cyq1162/archive/2006/11/16/562690.html sqlserver配置数据库连接字符串时需分2种情况 windows 和 s ...

  7. dstat 性能监测工具

    dstat 是一个可以取代vmstat,iostat,netstat和ifstat这些命令的多功能产品.dstat克服了这些命令的局限并增加了一些另外的功能,增加了监控项,也变得更灵活了.dstat可 ...

  8. How to Pronounce INTERNATIONAL

    How to Pronounce INTERNATIONAL Share Tweet Share Tagged With: Dropped T How do you pronounce this lo ...

  9. Redis进阶实践之一VMWare Pro虚拟机安装和Linux系统的安装

    一.引言 设计模式写完了,相当于重新学了一遍,每次学习都会有不同的感受,对设计模式的理解又加深了,理解的更加透彻了.还差一篇关于设计模式的总结的文章了,写完这篇总结性的文章,设计模式的文章就暂时要告一 ...

  10. 自定义worker的方法,及一例

    自定义的worker用于处理各种特殊需求. 有网友想用html_json提取雪球网(https://xueqiu.com/)的数据,可是雪球网用了反爬虫技术,网站要求有cookies才能访问到json ...