• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

'Cannot send session cache limiter' and 'Cannot modify header' error

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › 'Cannot send session cache limiter' and 'Cannot modify header' error

This topic is: not resolved
  • This topic has 1 reply, 2 voices, and was last updated 4 years, 4 months ago by andrenellin.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • September 22, 2018 at 3:45 am #223360
    fin3than
    Member

    I've been using Sample child theme & Genesis Framework for a couple of year without problem. But, after I've migrated my site to SiteGround (still not live yet), I started getting the following error on my plugin page.

    Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/ethany62/public_html/wp-content/themes/genesis-sample/functions.php:1) in /home/ethany62/public_html/wp-content/plugins/cm-answers-anonymous-posting/libs/FlashMessage.php on line 24

    Then, I got locked out from the site with the below error message on the WordPress sign-in page. I can no longer login to my site now.

    Warning: Cannot modify header information - headers already sent by (output started at /home/ethany62/public_html/wp-content/themes/genesis-sample/functions.php:1) in /home/ethany62/public_html/wp-content/plugins/better-wp-security/core/modules/hide-backend/class-itsec-hide-backend.php on line 411

    Here's the codes for functions.php

    
    <?php
    //* Start the engine
    include_once( get_template_directory() . '/lib/init.php' );
    
    //* Child theme (do not remove)
    define( 'CHILD_THEME_NAME', 'Genesis Sample Theme' );
    define( 'CHILD_THEME_URL', 'http://www.studiopress.com/' );
    define( 'CHILD_THEME_VERSION', '2.1.2' );
    
    //* Enqueue Google Fonts
    add_action( 'wp_enqueue_scripts', 'genesis_sample_google_fonts' );
    function genesis_sample_google_fonts() {
    
    	wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Lato:300,400,700', array(), CHILD_THEME_VERSION );
    
    }
    
    //* Add HTML5 markup structure
    add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list' ) );
    
    //* Add viewport meta tag for mobile browsers
    add_theme_support( 'genesis-responsive-viewport' );
    
    //* Add support for custom background
    add_theme_support( 'custom-background' );
    
    //* Add support for 3-column footer widgets
    add_theme_support( 'genesis-footer-widgets', 3 );
    
    //* Customize the credits
    add_filter( 'genesis_footer_creds_text', 'sp_footer_creds_text' );
    function sp_footer_creds_text() {
    	echo '<div class="creds"><p>';
    	echo 'Copyright &copy; ';
    	echo date('Y');
    	echo ' &middot; <a href="http://webcazine.com">Webcazine</a> &middot; All rights reserved.';
    	echo '</p></div>';
    }
    
    //* Widget for Adsense code after content
    add_theme_support( 'genesis-after-entry-widget-area' );
    
    //* Widget for Adsense code after title and meta text
    genesis_register_sidebar( array(
    	'id'          => 'after-title',
    	'name'        => __( 'After Title', 'theme' ),
    	'description' => __( 'This is the after title widget area.', 'theme' ),
    ) );
    add_action('genesis_entry_header', 'after_title_widget', 12 );
    function after_title_widget() {
    	if ( is_singular( 'post' ) )
    		genesis_widget_area( 'after-title', array(
    			'before' => '<div class="after-title widget-area">',
    			'after'  => '</div>',
    		) );
    
    }
    
    //* Display a custom favicon
    add_filter( 'genesis_pre_load_favicon', 'sp_favicon_filter' );
    function sp_favicon_filter( $favicon_url ) {
    	return 'https://webcazine.com/wp-content/uploads/2015/05/favicon.ico';
    }
    
    //* Add new widget Between Posts Area 
    genesis_register_sidebar( array(
    'id' => 'between-posts-area',
    'name' => __( 'Between Posts Area', 'basicwp-theme' ),
    'description' => __( 'This widget show between and after few posts.', 'basicwp-theme' ),
    ) );
     
    //* Add widget area between and after 3 posts
    add_action( 'genesis_after_entry', 'basicwptheme_between_posts_area' );
     
    function basicwptheme_between_posts_area() {
    global $loop_counter;
     
    $loop_counter++;
     
    if( $loop_counter == 2 ) {
     
     
    if ( is_active_sidebar( 'between-posts-area' ) ) {
        echo '<div class="between-posts-area widget-area"><div class="wrap">';
    	dynamic_sidebar( 'between-posts-area' );
    	echo '</div></div><!-- end .top -->';
    	}
     
    $loop_counter = 10;
     
    }
     
    }
    

    Does anyone know what could be the problem? The support from Siteground said it's a theme issue because changing the theme solves the problem. I know genesis is a great theme and I don't want to give up on it without trying to fix it myself (Although, I'm not tech savvy person).

    September 22, 2018 at 5:21 am #223361
    andrenellin
    Member

    1. Potential Plug-in Conflict
    Rename the plugins folder (plugins folder2) either in cpanel or using ftp (filezilla), thereby disabling all plugins. Now try access the admin dashboard. If you can access the admin dashboard when the plugins folder is renamed, then there is a conflict with one of your plugins. If it is a plug-in issue, rename the plug-in for back to plugins, and then rename all the plugins inside the folder. One by one, restore the plug-in name to the original name until the site breaks. That way you can isolate if it is a plug-in.

    2. PHP version
    Do you know what version of PHP your site was hosted in with your previous host. If it was an earlier version than what you are using now, you may have a plug-in that conflicts with the version you are using now.

    Start with those. This past week I switched to SiteGround and my sites feel faster. They are a good host.

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble