PHP网站报错Cannot start session without errors怎么解决

PHPz
Release: 2020-09-04 17:34:42
Original
2542 people have browsed it

PHP网站报错Cannot start session without errors怎么解决

PHP网站中出现如下错误:

Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.
Copy after login

解决办法如下:

找到php配置文件php.ini查找session.save_path ,将session.save_path=/var/lib/php5这一句的注释符号去掉。

如还不能正常工作,将session.auto_start的值改为1(启动),默认是0(禁用)这个错误一般是由于session文件的存储路径不可写造成的,在linux下一般是路径的权限问题。

在windows下面session.save_path一定要设置到一个可以读写的路径,如 D:/tmp 等。

更多相关知识,请访问 PHP中文网!!

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template