Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6897867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:13:24+00:00 2026-05-27T07:13:24+00:00

Possible Duplicate: “Warning: Cannot modify header information – headers already sent by” error In

  • 0

Possible Duplicate:
“Warning: Cannot modify header information – headers already sent by” error

In building a login form to plug into the wordpress system, all of a sudden despite working earlier. Ignore these stars in the error they are just to avoid public display of the webste.

Warning: Cannot modify header information - headers already sent by (output started at /home/divethe1/public_html/**********.com/wp-content/themes/RIKsoft/header.php:2) in /home/divethe1/public_html/********.com/wp-includes/pluggable.php on line 738

The codex says this is caused by space before and after the opening and closing , but there is not any. The offending line, ie. the one I can remove is $user = wp_signon( $creds, false ); to make it not cause this error, however then it doesn’t do what I want it to.

The code

<?php get_header(); ?>

 <?php 

 $creds = array();
$creds['user_login'] = $_POST['LOGuser'];
$creds['user_password'] = $_POST['LOGpass'];
$creds['remember'] = true;
$user = wp_signon( $creds, false );
if ( is_wp_error($user) )
   echo $user->get_error_message();

  ?>

        <?php if ( is_user_logged_in() ) { wp_redirect( $_POST['redirect'] ); exit; } 

        else { ?>

        <div class="panel log autoc">
    <div class="title"><b>LOG IN</b></div>
    <form action="http://www.robin-knight.com/access/" method="post">
        <label>Email Address<input name="LOGuser" type="text"></label>
        <label>Password<input name="LOGpass" type="password"></label>
        <input type="submit" class="button" value="Log In">
    </form>
</div>

        <?php }?>


<?php get_footer();?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T07:13:24+00:00Added an answer on May 27, 2026 at 7:13 am

    The headers have already been sent because some content has been sent (the space between your <?php ?> tags – yes, space is content too), content requires headers to be sent first, and you can’t modify the headers after they have already been sent.

    Combine the two into one to eliminate the space between them by changing

    <?php get_header(); ?>
    
     <?php 
    
     $creds = array();
     ...
    

    to

    <?php 
        get_header();
        $creds = array();
        ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Why do I get “Cannot redirect after HTTP headers have been sent”
Possible Duplicate: “Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given” error while
Possible Duplicate: “Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given” error while
Possible Duplicate: Weird “406 not acceptable” error following code generate a 406 Not Acceptable
Possible Duplicate: g++ “is not a type” error The following does not compile: 1
Possible Duplicate: “No newline at end of file” compiler warning i am a Linux
Possible Duplicate: Weird “406 not acceptable” error I've been stuck on this ALL DAY!
Possible Duplicate: SnowLeopard Xcode warning: “format not a string literal and no format arguments”
Possible Duplicate: Are “(function ( ) { } ) ( )” and “(function (
Possible Duplicate: ASP.NET “special” tags What is the difference between <%# ... %> ,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.