Big Problem

New Life Christian Center | More than a church. We are a famly.

I am having problem: I have the wp-members plug-in because I really need my content for registered members only. when anyone logs in at the wp-members login this comes up:

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/pem/vhosts/108867/webspace/httpdocs/blog/index.php:1) in /usr/local/pem/vhosts/108867/webspace/httpdocs/blog/wp-includes/pluggable.php on line 693 Warning: Cannot modify header information - headers already sent by (output started at /usr/local/pem/vhosts/108867/webspace/httpdocs/blog/index.php:1) in /usr/local/pem/vhosts/108867/webspace/httpdocs/blog/wp-includes/pluggable.php on line 694 Warning: Cannot modify header information - headers already sent by (output started at /usr/local/pem/vhosts/108867/webspace/httpdocs/blog/index.php:1) in /usr/local/pem/vhosts/108867/webspace/httpdocs/blog/wp-includes/pluggable.php on line 695 Warning: Cannot modify header information - headers already sent by (output started at /usr/local/pem/vhosts/108867/webspace/httpdocs/blog/index.php:1) in /usr/local/pem/vhosts/108867/webspace/httpdocs/blog/wp-includes/pluggable.php on line 897

those lines say:

693  setcookie($auth_cookie_name, $auth_cookie, $expire, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN, $secure, true);
694  setcookie($auth_cookie_name, $auth_cookie, $expire, ADMIN_COOKIE_PATH, COOKIE_DOMAIN, $secure, true);

897      header("Location: $location", true, $status);
}

I have the header banner set in the header.php file itself. It’s not a plugin but a banner I put in. the plugin author sent me this response:

The good news is that your problem is not with the WP-Members plugin. The error messages indicate that when wp_login fires, the headers have already been sent so it can’t set the set the cookies it needs to in order to maintain login state. WP-Members fires this when initialized so that it is done prior to headers being sent (headers in this case refer to the html document itself, and not your header.php file, which is done later). So what this means is that you have something that is sending the headers too early - that could be something in the theme, or it could be another plugin (although you’ve tried turning off all the plugins before, so I doubt that’s it)

I can’t use a different theme because this one is customized to the site. I have no idea where to go with this. the regular wp-login system works fine. on localhost the plugin works fine.

here is a temporary username and password if you want to give it a shot

trial
password

Things i have tried. Deleting a reinstalling plugin. Deleting all plugins except askimet. uploading wp-content again and replacing what it on the remote server. (since it works fine on localhost)

any plugins that can take this place- extensive registration form and block pages for registered members only.

Thanks

Can you post the first 10 lines of index.php as the error message says that the headers are sent on index.php on line 1

Make sure that NOTHING is before the opening <?php tag, that includes whitespace, empty lines or anything.


<style type="text/css">
.ft3 p {
	margin-bottom: 0px;
}
</style>
<?php
/**
 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 *
 * @package WordPress
 */

/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */
define('WP_USE_THEMES', true);

hmm so this is probably it. I am in the process of taking out the style and trying it.


<style type="text/css">
.ft3 p {
	margin-bottom: 0px;
}
</style>
<?php
/**
 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 *
 * @package WordPress
 */

/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */
define('WP_USE_THEMES', true);

hmm so this is probably it. I am in the process of taking out the style and trying it.

That worked thanks

Yep thats more than likely to be the problem :slight_smile:

yeah taking it out totally wrecked the style in my footer. thought just putting that into the style.css file would do the same but no. sigh. Really appreciate your help on my “big problem” now I only have little problems left

You can put it back in the file as long as it is below the opening php code block.