PHP出现 Warning: session_start()的解决方法
发布:smiling 来源: PHP粉丝网 添加日期:2014-01-13 22:30:28 浏览: 评论:0
错误提示: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 有写入修改权限即可 !
Tags: Warning: sessionstart
- 上一篇:用PHP控制您的浏览器cache
- 下一篇:PHP如何读取COOKIES
相关文章
- ·关于使用session_start 出现的headers (2013-11-27)
- ·session_start() [function.session-start]: Cannot send session cookie(2013-11-29)
- ·Fatal error: session_start(): Failed to initialize storage module:(2013-12-06)
推荐文章
热门文章
最新评论文章
- 写给考虑创业的年轻程序员(10)
- PHP新手上路(一)(7)
- 惹恼程序员的十件事(5)
- PHP邮件发送例子,已测试成功(5)
- 致初学者:PHP比ASP优秀的七个理由(4)
- PHP会被淘汰吗?(4)
- PHP新手上路(四)(4)
- 如何去学习PHP?(2)
- 简单入门级php分页代码(2)
- php中邮箱email 电话等格式的验证(2)