#1 WordPress forum plugin created by gVectors Team

wpForo – WordPress Forum Plugin
  • Home
  • Forum
  • Migrate to wpForo
  • Addons
  • Addons Demo
  • Documentation

Forum

Home | Forum

wpDiscuz - WordPress Comment Plugin
  • Forums
  • Members
  • Recent Posts
Forums
Main Support Forums
General Discussions
Error: Session_STAR...
 
Share:
Share
Tweet
Share
Notifications
Clear all

Error: Session_START issued when headers already published

Page 1 / 2 Next
    Last Post
RSS

dlinstedt
Posts: 47
 dlinstedt
Topic starter
March 26, 2020 8:27 pm
(@dlinstedt)
Eminent Member
Joined: 3 years ago

 

Error notification

For site  https://datavaultalliance.com

  • Error Level: E_WARNING
  • Message: session_start(): Cannot start session when headers already sent
  • File:  /wp-content/plugins/wpforo/wpf-includes/class-notices.php
  • Line: 16
  • Request: /wp-cron.php?doing_wp_cron=1585247436.2303390502929687500000
  • Referrer:    https://datavaultalliance.com/wp-cron.php?doing_wp_cron=1585247436.2303390502929687500000
  • User:

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.

Thanks

This topic was modified 2 years ago 2 times by dlinstedt
Topic Tags
session start wp-cron warning: session_start()
5 Replies
Anonymous20
Posts: 1602
 Anonymous20
March 26, 2020 8:40 pm
(@anonymous20)
Noble Member
Joined: 6 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?

 

Reply
BlackRaz
Posts: 49
 BlackRaz
Admin
March 26, 2020 9:10 pm
(@blackraz)
Contributor
Joined: 5 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.

In case you want to say thank you !)
We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.

Reply
Martin
Posts: 832
Martin - Facebook Martin - Twitter
 Martin
Moderator
March 27, 2020 5:40 am
(@martin)
Support Team
Joined: 6 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.

Powered by gVectors Team. our popular plugins:
wpForo, wpDiscuz

Reply
dlinstedt
Posts: 47
 dlinstedt
Topic starter
March 27, 2020 12:08 pm
(@dlinstedt)
Eminent Member
Joined: 3 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.

/wp-cron.php?doing_wp_cron=1585303603.4784479141235351562500

class wpForoNotices{

function __construct(){
$this->init();
}

/**
* @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

Reply
Page 1 / 2 Next
  All forum topics
  Previous Topic
Next Topic  
Topic Tags:  session start (2), wp-cron (1), warning: session_start() (3),

Forum Search

Join Us!

Download wpForo plugin
on WordPress.org

wpForo Addons

wpforo-private-messages wpforo-advanced-attachments-128x128 wpforo-embeds-128x128 wpForo User Custom Fields addon wpForo – Blog Cross Posting addon wpForo Ads Manager wpForo – WooCommerce Memberships Integration wpForo Emoticons wpForo – Tenor GIFs Integration
View all Addons »

Recent Topics

  • Menu location

    By Vijiki, 1 hour ago

  • Setting recent topics on forum frontend

    By Vijiki, 9 hours ago

  • Draft draft users post on wpforo

    By Vijiki, 11 hours ago

  • How to remove content from email notification

    By Vijiki, 11 hours ago

  • How to prevent forum users from PASTING / posting multiple colors and font sizes...??

    By Noved, 2 days ago

  • purchase of add on and it says payment pending

    By ReddBeard, 2 days ago

Topic Tags

  • translation49
  • css49
  • plugin conflict48
  • seo45
  • new features44
  • buddypress42
  • ultimate member40
  • avatar40
  • forum40
  • moderation38
  • login38
  • registration36
  • threaded layout35
  • cache33
  • editor32
  • menu32
  • shortcode31
  • spam29
  • phrases28
  • forum accesses28
View all tags (2163)

Recent Posts

  • Menu location

    I will like to change the menu drop-down position/behav...

    By Vijiki, 1 hour ago

  • RE: Setting recent topics on forum frontend

    ok, now you explained better what you want to do. It ca...

    By dimalifragis, 3 hours ago

  • Problem with private forum

    Hi, i've one problem with my private forum. I want the ...

    By Darkkang, 10 hours ago

  • Draft draft users post on wpforo

    Hello How can I draft users post on wpforo (like a te...

    By Vijiki, 11 hours ago

  • RE: How to remove content from email notification

    Edit the body of the emails, in wpForo settings / email...

    By dimalifragis, 11 hours ago

  • RE: Show Likers with their avatar

    Have now found the correct code 😀 are these 3 lines ...

    By Tutrix, 2 days ago

  • RE: How to prevent forum users from PASTING / posting multiple colors and font sizes...??

    @noved add this to custom css #wpforo #wpforo-wrap ...

    By Tutrix, 2 days ago

Share:
Share
Tweet
Share
  Forum Statistics
20 Forums
9,763 Topics
49.5 K Posts
3 Online
43.8 K Members

Latest Post: Menu location Our newest member: Betregister232 Recent Posts Unread Posts Tags

Forum Icons: Forum contains no unread posts Forum contains unread posts

Topic Icons: Not Replied Replied Active Hot Sticky Unapproved Solved Private Closed

Powered by wpForo | Copyright © 2016-2022 gVectors Team
Copyright Registration Service - Click here for more information or to register work
wpForo is Registered with the IP Rights Office
Copyright Registration Service

Ref: 4477265538
  • Home
  • Forum
  • Migrate to wpForo
  • Addons
  • Addons Demo
  • Documentation