How to solve header - error -PHP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vssp
    Contributor
    • Jul 2006
    • 268

    #1

    How to solve header - error -PHP

    Hai Friends
    While running my application i got this error. How to solve thsi error.
    Plesae send me any idea.


    PHP Warning: Cannot modify header information - headers already sent by (output started at /home/mixpublic_html/includes/common.php:244) in /home/mix/public_html/MiX/program/include/main.inc on line 673
    Thanks
    Vssp
  • sashi
    Recognized Expert Top Contributor
    • Jun 2006
    • 1749

    #2
    Hi VSSP,

    This error usually looks something like:

    Cannot add header information - headers already sent by (output started at /some/path/to/path.php:1)

    There are two main times you can see this error:

    1. In the first case, this error is caused by blank lines or white space after the closing ?> in the file specified (or before the opening <?php); path.php, in this case. Edit the file in a regular text editor and remove any white space or blank lines after the closing, or before the opening, PHP tag.

    2. If this error appears in addition to another error, then it likely exists simply because the other error is present. The fact that the other error occurred can cause this error to appear. Once the other error is eliminated, this error will usually disappear as well.

    take care my fren.. :)

    Comment

    • vssp
      Contributor
      • Jul 2006
      • 268

      #3
      Thanks sashi ,

      I fixed the issue .

      Thanks
      Vssp

      Comment

      • clevoy
        New Member
        • Oct 2006
        • 1

        #4
        Hi,
        I have a similar problem. Basically, I have a main.php which sets up a toolbar and calls in other pages (like- case: something: include(somethi ng.php);break;) ...this is basically so that I can have the toolbar in one location, so that I can change it in only that place instead of every single page. So I have some php in the beginning to make sure the user is signed in. Then I have the html. Included in the html is the 'include' feature php (this way the pages are called under the toolbar). The problem is, most of the pages being called are php pages. So, when I have a php page that has a "header:" in it, it comes up with the error. When I moved the "case/include" php in the main.php to above the html, everything worked fine. Now it just looks stupid, with the toolbar underneath it. I am sorry for the complicated story, but I was hoping that somebody would have a suggestion (maybe an easier way to store the toolbar in one location.) Thanks for any and all help.

        Comment

        Working...