zoukankan      html  css  js  c++  java
  • PHP+mysql系统报错:PHP message: PHP Warning: Unknown: Failed to write session data (files)

    PHP+mysql系统报错:PHP message: PHP Warning:  Unknown: Failed to write session data (files)


    故障现象,后台页面点击没有反应,也不报错


    通过查看log文件,可以通过在nginx中单独定义错误日志文件,方便定位错误


    /data/logs/www.aaasdk.com-error.log


    报错信息:


    PHP message: PHP Warning:  Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0" while reading upstream, client: 218.18.1.158, server: aaasdk.com, request: "GET /inc/fun/verification_code.php?code_name=manage&code_length=4&code_char=en&code_creat=1&rand_code=65d23d8e07 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.17aaa.com", referrer: "http://www.aaa.com/manage/index.php?setTips=1"
    2016/09/07 14:53:33 [error] 21880#0: *101 FastCGI sent in stderr: "PHP message: PHP Warning:  session_start(): open(/var/lib/php/session/sess_5g65lrovdqg9avscb09oq1p161, O_RDWR) failed: Permission denied (13) in /var/www/web/www.aaasdk.com/inc/site_config.php on line 10" while reading response header from upstream, client: 14.154.162.129, server: aaasdk.com, request: "POST /ajax/chack_name.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.17aaa.com", referrer: "http://www.17aaa.com/member/reg.php"
    2016/09/07 14:53:33 [error] 21880#0: *101 FastCGI sent in stderr: "PHP message: PHP Warning:  Unknown: open(/var/lib/php/session/sess_5g65lrovdqg9avscb09oq1p161, O_RDWR) failed: Permission denied (13) in Unknown on line 0


    解决办法:

    修改/var/lib/php/session 目录权限 chmod 777  /var/lib/php/session 


  • 相关阅读:
    三元表达式、递归、匿名函数
    迭代器、生成器、面向对象
    LeetCode35-搜索插入位置(二分查找)
    自动化测试框架搭建3-TestNG
    LeetCode28-实现strStr()(水题)
    前端页面与Nodejs使用websocket通信
    LeetCode14-最长公共前缀(水题)
    LeetCode13-罗马数字转整数(水题)
    AngularJS学习3-服务(service)/http服务/跨域
    九度OJ 1001:A+B for Matrices
  • 原文地址:https://www.cnblogs.com/reblue520/p/6239718.html
Copyright © 2011-2022 走看看