How to fix intermittent PHP Fatal error: Unknown: Cannot find save handler '/var/lib/php/session' [duplicate]

一曲冷凌霜 提交于 2019-12-14 03:35:41

问题


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.

PHP Fatal error: Unknown: Cannot find save handler '/var/lib/php/session'

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.

I've tried switching to memcached but same issue.

Can anyone share any light on whats causing this error?

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

Thanks in advance guys.


回答1:


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

edit your php.ini and change the following

we are using the /tmp directory here.

session.save_path = /tmp

more information can be found here

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



来源:https://stackoverflow.com/questions/57740323/how-to-fix-intermittent-php-fatal-error-unknown-cannot-find-save-handler-var

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!