Results 1 to 3 of 3

Thread: Error in Login of My website

  1. #1
    Join Date
    Jul 2012

    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
    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:
     . . . . .  <===== trailing white space
    Natdrip :P
    "water go down the hole" - plucky duck

  3. #3
    Join Date
    Aug 2004
    Note that session_start() and setcookie() send HTTP headers, not to mention the header() function, of course.
    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

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