我该如何解决这个问题呢?警告:session_start():无法发送会话缓存限制器“ [英] how do I fix this " Warning: session_start(): Cannot send session cache limiter"

查看:75
本文介绍了我该如何解决这个问题呢?警告:session_start():无法发送会话缓存限制器“的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎样才能找到我的脚本第一次输出到屏幕上

的位置?


我的错误日志中充满了这样的东西:

[2006年5月24日19:51:22] PHP警告:session_start():无法发送

会话缓存限制器 - 已经发送的标头

/home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/pdsIncludes/CommandStartSession.php
第14行


[5月24日 - 2006 19:51:22] PHP警告:无法修改标题信息 -
已经发送的
标题

/home/httpd/vhosts/monkeyclaus.org/httpdocs/media/ audio / pdsIncludes / CommandSetMachineIdOnVisitorsMachine.php
第26行


[2006年5月24日19:51:26] PHP警告:session_start():无法发送

会话缓存限制器 - 已经发送的标头

/home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/pdsIncludes/CommandStartSession.php

在第14行

[2006年5月24日19:51:26] PHP警告:无法修改y标题信息 -
已经发送的
标题

/home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/pdsIncludes/CommandSetMachineIdOnVisitorsMachine.php
第26行


[2006年5月24日19:54:42] PHP警告:session_start():无法发送

会话缓存限制器 - 已经是标题发送邮件

/home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/pdsIncludes/CommandStartSession.php
第14行


[2006年5月24日19:54:42] PHP警告:无法修改标题信息 -

标题已在

/ home / httpd / vhosts / monkeyclaus中发送。 org / httpdocs / media / audio / pdsIncludes / CommandSetMachineIdOnVisitorsMachine.php
第26行


[2006年5月24日19:54:45] PHP警告:session_start() :无法发送

会话缓存限制器 - 已经发送的标头

/home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/pdsIncludes/CommandStartSession.php <第14行


[5月24日-2006 19:54:46] PHP警告:无法修改标题信息 -
已经发送的
标题

/home/httpd/vhosts/monkeyclaus.org/httpdocs/media /audio/pdsIncludes/CommandSetMachineIdOnVisitorsMachine.php
第26行



但他们指向的行是


session_start();

session_register();

解决方案

lawrence k写道:


我怎样才能第一次找到我的脚本输出到屏幕的位置?


它可能不是你的剧本;它可能是你的文件之一

包括......

我的错误日志中充满了这样的东西:
....但行他们指的是

session_start();
session_register();




你可能有空格或空在某个文件的开头和第一个<?之间的某一行...找到并删除它。

或者,使用输出缓冲;在开始时缓慢启动

脚本并在完成

会话后转储缓冲区...


干杯,

NC


文章< 11 ************* *********@38g2000cwa.googlegroups。 com>,

lawrence k< lk ****** @ geocities.com>写道:

[2006年5月24日19:51:22] PHP警告:无法修改标题信息 -
标题已在

中发送


你在会议开始前发送一些身体。不要
那样做;)


-
http://www.spinics.net/lists/php/


其实那里可以是任何<?之后的空格或空行,在任何?>之后,

脚本中包含的文件中的任何html,或者甚至是

之前的标题语句会话开始语句。您可以尝试在文件的

开始时开始会话,然后将其移回到您拥有它的位置,直到您找到有问题的代码为止。


记住会话开始必须在任何输出发送之前完成。


James

How can I find out where my script is outputting to the screen for the
first time?

My error logs are full of stuff like this:
[24-May-2006 19:51:22] PHP Warning: session_start(): Cannot send
session cache limiter - headers already sent in
/home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/pdsIncludes/CommandStartSession.php
on line 14
[24-May-2006 19:51:22] PHP Warning: Cannot modify header information -
headers already sent in
/home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/pdsIncludes/CommandSetMachineIdOnVisitorsMachine.php
on line 26
[24-May-2006 19:51:26] PHP Warning: session_start(): Cannot send
session cache limiter - headers already sent in
/home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/pdsIncludes/CommandStartSession.php
on line 14
[24-May-2006 19:51:26] PHP Warning: Cannot modify header information -
headers already sent in
/home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/pdsIncludes/CommandSetMachineIdOnVisitorsMachine.php
on line 26
[24-May-2006 19:54:42] PHP Warning: session_start(): Cannot send
session cache limiter - headers already sent in
/home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/pdsIncludes/CommandStartSession.php
on line 14
[24-May-2006 19:54:42] PHP Warning: Cannot modify header information -
headers already sent in
/home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/pdsIncludes/CommandSetMachineIdOnVisitorsMachine.php
on line 26
[24-May-2006 19:54:45] PHP Warning: session_start(): Cannot send
session cache limiter - headers already sent in
/home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/pdsIncludes/CommandStartSession.php
on line 14
[24-May-2006 19:54:46] PHP Warning: Cannot modify header information -
headers already sent in
/home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/pdsIncludes/CommandSetMachineIdOnVisitorsMachine.php
on line 26

but the lines they are pointing to are

session_start();
session_register();

解决方案

lawrence k wrote:


How can I find out where my script is outputting to the screen
for the first time?
It may not be your script; it could be one of the files you are
including...
My error logs are full of stuff like this: .... but the lines they are pointing to are

session_start();
session_register();



You probably have a blank space or an empty line somewhere between the
beginning of a file and the first "<?"... Find it and delete it.
Alternatively, use output buffering; start buffering at the beginning
of the script and dump the buffer after you''re done working with
sessions...

Cheers,
NC


In article <11**********************@38g2000cwa.googlegroups. com>,
lawrence k <lk******@geocities.com> wrote:

[24-May-2006 19:51:22] PHP Warning: Cannot modify header information -
headers already sent in



You''re sending some of the body before the session is started. Don''t
do that ;)

--
http://www.spinics.net/lists/php/


Actually there could be a space or blank line before any <?, after any ?>,
any html in files included in the script or even a header statement prior to
the session start statement. You can try starting the session at the
begining of the file and then moving it back to where you had it until you
find the offending code.

Just remember the session start has to be done prior to any output being
sent.

James


这篇关于我该如何解决这个问题呢?警告:session_start():无法发送会话缓存限制器“的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆