在使用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 write session data (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
然后重启服务
- 第二种方法:
session.save_path = "设置一个有效文件夹的绝对路径"
(比如 session.save_path = "C:\XXX\temp" )
session.save_path = 前面的 “;”分号去掉
标签:...,save,Warning,Unknown,start,session,报错,php
From: https://www.cnblogs.com/lijiaxiang/p/16954506.html