php+替换系统报错信息,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)

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

bf54e0e0038354399e729dc5ceff6566.png

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

d6fd8caaf9265ca13327bd06c4a76540.png

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

报错信息:

37a357dedd523f0407b0468c1e25b467.png

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值