ASCII码 ASCII码

安装phpStudy后报错:Warning: session_start()...” 的解决方法

发布于:2022-02-16 10:44:07  栏目:技术文档

最近小编在使用phpstudy的时候遇到以下报错:

Warning: session_start(): open(C:/Program Files/php/sessiontemp\sess_0cde28de3ce1a2e2cc8e8723b5a40279, O_RDWR) failed: Permission denied (13) in D:\home\400m\zmxxx\web\syssite\install\datainstall.php on line 7

Warning: Unknown(): open(C:/Program Files/php/sessiontemp\sess_0cde28de3ce1a2e2cc8e8723b5a40279, O_RDWR) failed: Permission denied (13) in Unknown on line 0

Warning: Unknown(): Failed to writesessiondata (files). Please verify that the current setting of session.save_path is correct (C:/Program Files/php/sessiontemp) in Unknown on line 0

下面为大家提供我的解决方式:

第一种方法:

修改php.ini中的session.auto_start = 0 为 session.auto_start = 1

重启IIS调试!

第二种方法:

session.save_path = "设置一个有效文件夹的绝对路径"(比如 session.save_path = "C:\WINDOWS\temp" )session.save_path =前面的 “;”分号去掉

相关推荐
阅读 +