SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Nov 2005
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Please help if you can

    I'm getting this error and do not know how to fix, any help would be great!

    ------

    Warning: Cannot modify header information - headers already sent by (output started at /home2/yourfm/public_html/station/make_header.php:11) in /home2/yourfm/public_html/station/disp_users.php on line 135

    ------

    Many thanks

  2. #2
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    this is a php error, not a mysql error

  3. #3
    SitePoint Zealot
    Join Date
    Dec 2005
    Posts
    184
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by your.fm
    I'm getting this error and do not know how to fix, any help would be great!

    ------

    Warning: Cannot modify header information - headers already sent by (output started at /home2/yourfm/public_html/station/make_header.php:11) in /home2/yourfm/public_html/station/disp_users.php on line 135

    ------

    Many thanks
    You are trying to send out an HTTP header but have already sent out text data - at this point it is too late for headers.

    Headers can be sent out by PHP functions including header(), setcookie(), session_start() and probably others.

    The way to fix it is to not do this. Send out all your headers BEFORE any text. Make sure all the above stuff is done before your very first line of HTML is output. You can use the output buffering functions (ob_start() et al) to help in this area.

  4. #4
    SitePoint Enthusiast BarnYard's Avatar
    Join Date
    Feb 2006
    Location
    Istanbul
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As mentioned above, you can use output buffering:

    Code:
    ob_start();
    mail( $yourEmail, "Thank you", $message, "From: $myEmail" );
    header("Location: nextpage.php");
    ob_end_flush();
    As well, make absolutely certain there are no whitespaces after any includes, etc. Good luck!

  5. #5
    SitePoint Enthusiast lotrgamemast's Avatar
    Join Date
    Apr 2005
    Location
    Cheshire, England
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    also make sures theres no whitespace before the open php thingy (<?php). That causes this error as well.


Bookmarks

Posting Permissions

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