从插件
-
-
发布" header.php"的前10行左右Post the first 10 or so lines of `header.php`
- 0
- 2013-07-05
- s_ha_dum
-
@s_ha_dum您好,感谢您的回复-原始问题已根据要求更新Hi @s_ha_dum thanks for responding - original question updated as requested
- 0
- 2013-07-05
- Osu
-
该文件应该发送输出.那不是问题.___关闭___关闭调试.你还有问题吗?That file _should_ be sending output. That is not the problem. Turn debugging ___off___. Do you still have the problem?
- 0
- 2013-07-05
- s_ha_dum
-
这就是我在`wp-config.php`中设置调试的方式:`define('WP_DEBUG',false);`-我假设您的意思不是php.ini?This is how my debugging is set up in `wp-config.php` : `define('WP_DEBUG', false);` - I assume you meant that rather than php.ini?
- 0
- 2013-07-05
- Osu
-
直播网站的网址是什么?What is the URL to the live site?
- 0
- 2013-07-05
- s_ha_dum
-
http://www.instrumentalbackgroundmusic.com,这是显示错误的页面示例:http://www.instrumentalbackgroundmusic.com/royalty-free-music/test-track-jazz-indie/http://www.instrumentalbackgroundmusic.com and this is an example of a page that shows the error: http://www.instrumentalbackgroundmusic.com/royalty-free-music/test-track-jazz-indie/
- 0
- 2013-07-05
- Osu
-
让我们[继续聊天中的讨论](http://chat.stackexchange.com/rooms/9531/discussion-between-s-ha-dum-and-osu)let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/9531/discussion-between-s-ha-dum-and-osu)
- 0
- 2013-07-05
- s_ha_dum
-
1 个回答
- 投票数
-
- 2013-07-05
如果您查看页面的源代码,则会在第122行看到以下内容:
<div class="nav-collapse collapse"> <br /> <b>Warning</b>: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent by (output started at /home1/onesizeu/clients/instrumentalbackgroundmusic.com/wp-includes/functions.php:2841) in <b>/home1/onesizeu/clients/instrumentalbackgroundmusic.com/wp-content/plugins/osu-royaltfreemusic/osu-royaltyfreemusic.php</b> on line <b>225</b><br /> <br /> <b>Warning</b>: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home1/onesizeu/clients/instrumentalbackgroundmusic.com/wp-includes/functions.php:2841) in <b>/home1/onesizeu/clients/instrumentalbackgroundmusic.com/wp-content/plugins/osu-royaltfreemusic/osu-royaltyfreemusic.php</b> on line <b>225</b><br /> <ul id="menu-primary" class="nav"><li id="menu-item-9" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-9"><a href="http://www.instrumentalbackgroundmusic.com/">Home</a></li>
某事正在尝试在页面正文中很好地启动会话.你不能那样做.在将任何内容发送到浏览器之前,必须先启动会话.
此修补程序在概念上很简单-将
session_start
函数挂接到某些在打印内容之前运行的挂钩.像这样:function boot_session() { session_start(); } add_action('wp_loaded','boot_session');
我不知道到底是在调用
session_start
还是为什么调用它,所以实际的修复方法可能更复杂,但这是基本的修复方法.If you look at the source of the page you will see this around line 122:
<div class="nav-collapse collapse"> <br /> <b>Warning</b>: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent by (output started at /home1/onesizeu/clients/instrumentalbackgroundmusic.com/wp-includes/functions.php:2841) in <b>/home1/onesizeu/clients/instrumentalbackgroundmusic.com/wp-content/plugins/osu-royaltfreemusic/osu-royaltyfreemusic.php</b> on line <b>225</b><br /> <br /> <b>Warning</b>: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home1/onesizeu/clients/instrumentalbackgroundmusic.com/wp-includes/functions.php:2841) in <b>/home1/onesizeu/clients/instrumentalbackgroundmusic.com/wp-content/plugins/osu-royaltfreemusic/osu-royaltyfreemusic.php</b> on line <b>225</b><br /> <ul id="menu-primary" class="nav"><li id="menu-item-9" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-9"><a href="http://www.instrumentalbackgroundmusic.com/">Home</a></li>
Something is trying to start a session well into the body of the page. You can't do that. Sessions need to be started before any content is sent to the browser.
The fix for this is conceptually simple-- hook the
session_start
function to some hook that runs before content is printed. Something like this:function boot_session() { session_start(); } add_action('wp_loaded','boot_session');
I don't know what, exactly, is calling
session_start
or why, so the practical fix may be more complicated but that is the basic fix.
我为自己为我构建的Wordpress插件遇到了"已发送标头"错误,现在我正在适应.这是错误:
我已经看过header.php第2行,这是没有多余空格和有趣字符等的地方:
我已经查看了osu-rfm.php中的225行,这是该文件的一部分(这是插件btw):
现在我完全不知所措,因为我不知道下一步该怎么做...有人可以提出建议吗?我删除了所有主题文件结尾和开头的所有空白,如此处建议,但这似乎没有什么不同.我还尝试过删除插件文件末尾的
?>
标记,但要删除nada.顺便说一句,这仅发生在我的实时服务器上,而不是我的本地设置上,所以我觉得这可能是服务器问题.
谢谢
Osu