www.webdeveloper.com
Results 1 to 3 of 3

Thread: Error in Login of My website

Hybrid View

  1. #1
    Join Date
    Jul 2012
    Posts
    1

    Exclamation Error in Login of My website

    I host my website through Awardspace. Every thing is ok but when I am login as admin or user I am getting a warning which is "Warning: Cannot modify header information - headers already sent by (output started at /srv/disk8/1065242/www/gadgetsolution.co.cc/include/header.php:2) in /srv/disk8/1065242/www/gadgetsolution.co.cc/login.php on line 21". If any one can help me help me.................

  2. #2
    Join Date
    Jan 2004
    Posts
    484
    Some where before the header statements, you're echoing out some data. You can't do that.

    No data can be sent before headers. See: http://us.php.net/manual/en/function.header.php

    You can use ob_start & ob_flush to buffer the output so that you can send data before headers.

    Either fix the echo that's being sent before the header or put ob_start at the very beginning of the php file and at the very end of the php file.

    some times there is a white space from an include file that can cause this ie.

    PHP Code:
    <?php
     code
    ?>
     . . . . .  <===== trailing white space
    Natdrip :P
    "water go down the hole" - plucky duck

  3. #3
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,322
    Note that session_start() and setcookie() send HTTP headers, not to mention the header() function, of course.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles