Community Forums › Forums › Archived Forums › General Discussion › 'Cannot send session cache limiter' and 'Cannot modify header' error
- This topic has 1 reply, 2 voices, and was last updated 5 years, 2 months ago by
andrenellin.
-
AuthorPosts
-
September 22, 2018 at 3:45 am #223360
fin3than
MemberI'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 © '; echo date('Y'); echo ' · <a href="http://webcazine.com">Webcazine</a> · 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 #223361andrenellin
Member1. 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.
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.