Jump to content

Cannot modify header information - headers already sent


soumadri

Recommended Posts

i have two files

  1. access_user_class.php - for login management

  2. login.php - for login GUI (which includes my gui template from another file)

 

The include sequence in login.php is

      1> access_user_class.php

      2> template1_wobar.php

 

eg.

include("$_SERVER[DOCUMENT_ROOT]/includes/stripgpcslash.inc.php");

include("$_SERVER[DOCUMENT_ROOT]/classes/access_user/access_user_class.php");

include("$_SERVER[DOCUMENT_ROOT]/includes/validate_email.inc.php");

include("$_SERVER[DOCUMENT_ROOT]/includes/injection_attack.inc.php");

include("$_SERVER[DOCUMENT_ROOT]/includes/cleanvar.inc.php");

include("$_SERVER[DOCUMENT_ROOT]/template1_wobar.php");

 

 

 

now when login is successful i call a function from access_user_class.php, which inturn sets the http header location: to my home page.

e.g.

if ($goto_page) {

header("Location: ".$next_page);

exit;

}

here i am getting the following warning, bcoz of which my home page is not rendering

Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\template1_wobar.php:8) in C:\wamp\www\classes\access_user\access_user_class.php on line 111

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.