用户名:
密 码: 记住
您当前的位置:首页 > 网络编程 > php教程

PHP出现 Warning: session_start()的解决方法

时间:2015-01-23  来源:西部数据  作者:西部数据

错误提示:Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at E:phpcodeadmin.php:1) in E:phpcodelogolistadminlogo.php on line 2

解决办法,修改php.ini中的session.auto_start = 0 为 session.auto_start = 1

重启IIS调试!如果还提示以下类似的警告

Warning: session_start() [function.session-start]: open(/tmp\sess_84cb589ea249708b09c3d5e6836fdd0d, O_RDWR) failed: No such file or directory (2) in E:\web\htdocs\111.php on line 9   

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at E:\web\htdocs\111.php:8) in E:\web\htdocs\111.php on line 9   

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at E:\web\htdocs\111.php:8) in E:\web\htdocs\111.php on line 9   

test222.php   

Warning: Unknown(): open(/tmp\sess_84cb589ea249708b09c3d5e6836fdd0d, O_RDWR) failed: No such file or directory (2) 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 (/tmp) in Unknown on line 0  

就是 session变量需要系统的临时空间,session.save_path = "设置一个有效文件夹的绝对路径" ,(比如 session.save_path = "C:\WINDOWS\temp" )

session.save_path =前面的 ' ; '号去掉 ,另外编辑该文件夹的权限 添加EVERYONE 有写入修改权限即可 !

来顶一下
返回首页
返回首页
推荐资讯
WiFi太不安全:7岁女孩11分钟内入侵公共网络 WiFi太不安全:7岁女孩11分钟内入侵近期刚刚发布研究说WiFi网络能获得人们手机里多少私人信息,
不服跑个分?人工智能也出现“刷分”乱象 不服跑个分?人工智能也出现“刷分2014年,人工智能领域突然爆发,成为了科研和科技创业的热门
相关文章
栏目更新
栏目热门