Clear all

[Closed] Error: Session_START issued when headers already published

6 Posts
4 Users
0 Reactions
Posts: 47
Topic starter
Trusted Member
Joined: 5 years ago


Error notification

For site

I am using "Fatal Error Notify" to produce the warning and email me when this happens.  It seems to happen quite frequently, causing my site to slow down.  The indication is the error is occurring in wpForo - class-notices.php

Can you fix this please? or look into this?  I realize it's a warning, but still - even warnings (happening every minute through wp-cron) slow the entire site down.


5 Replies
Posts: 1602
Noble Member
Joined: 8 years ago

This is NOT a warning actually but a major error. And i doubt it comes from wpForo.

Do you have DEBUG to a LOG enabled ? If so do you see any errors in there?

Also is that a new problem? An old one? A new installation? Any custom work or any manually changed code?


Posts: 406
Joined: 8 years ago

Hi Dear @dlinstedt
This problem has not come from the wpforo plugin.
Before the init process, your site generates some warning or other server messages, and PHP start_session() function cannot start if headers already sent.
1) You should find these problems from other plugin or theme codes and fix, to allow wpforo normally can start her session.
2) Or you can paste this code to your wp-config.php

define( 'WP_DEBUG', false);
define( 'WP_DEBUG_DISPLAY', false);
define( 'SCRIPT_DEBUG', false);

for disabling send server messages to your front, to allow wpforo normally can start her session.

Posts: 988
Support Team
Joined: 8 years ago

You have PHP errors coming from other plugins or you have spaces/line-breaks in functions.php of the theme after ?> or before <?php tags. wpForo always displays this error when there are such problems. Those problems stop wpForo sessions and you see this error. So this is just a result not the reason. you should find the reason.

In other words, your website output is affected by other plugin error and it generates "headers already sent " NOTICE in wpForo functions. It'll generates such notices in all plugins who have session functions. So please find the plugin who generates errors or outputs in header. Deactivate those one by one and check, once the wpForo Notice is gone then the problem is fixed and you found the problem maker plugin.

Posts: 47
Topic starter
Trusted Member
Joined: 5 years ago

Thank you for your replies.  I will take your advice Martin and look deeper into the causes.  I did however want to point out two things:

wpForoNotices and it's happening ONLY under wp-cron action:  (I think? that under wp-cron execution, it does NOT start session in wpforo, i mean - why would it under the cron action?)  wp-cron has no reason to "start a session for wpforo" does it?  furthermore, isn't wp-cron kicked off AFTER the headers of wordpress are sent?  I thought it was enqueued action executed after page delivery.


class wpForoNotices{

function __construct(){

* @return void
private function init(){
if( !wpforo_is_session_started() && ( !is_admin() || (!empty($_GET['page']) && strpos($_GET['page'], 'wpforo-') !== false ) || (wpforo_is_ajax() && !empty($_POST['action']) && false !== strpos($_POST['action'], 'wpforo')) )) session_start();

All that, I will Martin, take your advice and find the culprit.   Thanks, Dan

Page 1 / 2