Home  >  Article  >  Backend Development  >  PHP网站报错Cannot start session without errors怎么解决

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

PHPz
PHPzOriginal
2016-06-20 13:04:122541browse

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.

解决办法如下:

找到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中文网!!

Statement:
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