Warning: session_start() [function.session-start]
我的电脑中的错误提示
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at D:APMServ-v5.2.6APMServ5.2.6wwwhtdocsKingNerOAuserUserKqManage.php:1) in D:APMServ-v5.2.6APMServ5.2.6wwwhtdocsKingNerOAusercheckaccess.php on line 2
原因就是前面有输出
解决办法:
修改php.ini中的session.auto_start = 0 为 session.auto_start = 1
output_buffering =改为on或者任何数字。
linux中解决办法
解决办法:
方法1、注释掉/etc/php.ini中
session.save_path = “/var/lib/php/session”
方法2、查看apache用户和组,然后将该用户加到session文件夹所处的组中。
方法3,在session_start() 前不要有任何输出!
错误提示2
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
就是 session变量需要系统的临时空间
session.save_path = "设置一个有效文件夹的绝对路径"
(比如 session.save_path = "C:WINDOWStemp" )
session.save_path =前面的 ' ; ' 号去掉
另外编辑该文件夹的权限 添加EVERYONE 有写入修改权限即可 !
推荐阅读
-
PHP提示Warning:phpinfo() has been disabled函数禁用的解决方法
-
消除Warning: Using a password on the command line interface can be insecure的提示
-
Warning: mysqli::__construct(): (HY000/1698): Access denied for user 'root'@'localhost'问题解决
-
Electron – 项目打包报错(1): WARNING: Make sure that .NET Framework 4.5 or later and Powershell 3 or later are installed, otherwise extracting the Electron z
-
php提示Warning:mysql_fetch_array() expects的解决方法
-
Module build failed: Module failed because of a eslint warning
-
AndroidStudio报错:Emulator: I/O warning : failed to load external entity "file:/C:/Users/Administrator/.AndroidStudio3
-
PHP session_start()问题解疑(详细介绍)
-
解决:WARNING: You are using pip version 20.0.2; however, version 20.2.2 is available
-
Warning: session_destroy() : Trying to destroy uninitialized sessionq错误