如何修复间歇性PHP致命错误:未知:找不到保存处理程序'/var/lib/php/session' [英] How to fix intermittent PHP Fatal error: Unknown: Cannot find save handler '/var/lib/php/session'

查看:163
本文介绍了如何修复间歇性PHP致命错误:未知:找不到保存处理程序'/var/lib/php/session'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

非常断断续续,很少我的Centos7 httpd 2.4.41和php 5.6.40服务器将一半加载页面. PHP已加载,但CSS和JS包括在chrome中获取错误连接重置",并将此错误转储到php错误日志中.

Very intermittently and rarely my Centos7 httpd 2.4.41 and php 5.6.40 server will half load a page. The PHP loads, but the CSS and JS includes get the error 'Connection Reset' in chrome and dump this error into the php error log.

我已经检查了会话文件的权限,并且服务器有足够的空间,事实上,它大部分时间都在工作,这让我很头疼.

I have checked permissions on the session files, and the server has plenty of space, the fact that it works most of the time makes my scratch my head.

我尝试过切换到memcached,但存在相同的问题.

I've tried switching to memcached but same issue.

任何人都可以就导致此错误的原因分享看法吗?

Can anyone share any light on whats causing this error?

还是致命错误发生后堆栈跟踪httpd PID的方法?

Or perhaps a way to stacktrace the httpd PID after the fatal error?

预先感谢大家.

推荐答案

此问题可能与您的会话保存路径有关.如果您不知道保存会话的位置.

This issue might be related to your session save path. If you are not precious on where to save the sessions.

编辑您的php.ini并更改以下内容

edit your php.ini and change the following

我们在这里使用/tmp目录.

we are using the /tmp directory here.

session.save_path =/tmp

session.save_path = /tmp

更多信息可以在这里找到

more information can be found here

http://www.php .net/manual/en/session.configuration.php#ini.session.save-path

这篇关于如何修复间歇性PHP致命错误:未知:找不到保存处理程序'/var/lib/php/session'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆