What does it mean????

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • bettina@coaster.ch

    What does it mean????

    I've sent all my PHP sites to the server and when calling it I receive
    this message:

    Warning: session_start() : Cannot send session cookie - headers already
    sent by (output started at /home/coaster/public_html/index.php:7) in
    /home/coaster/public_html/index.php on line 18

    Help will be welcome!

  • petermichaux@yahoo.com

    #2
    Re: What does it mean????

    This is just a guess but I had a similar "output started" error one
    time. Try adding ob_start(); like this at the very start of your
    application:

    <?php
    ob_start();
    session_start() ;

    Comment

    • bettina@coaster.ch

      #3
      Re: What does it mean????

      It still doesn't work...

      Comment

      • Jerry Stuckle

        #4
        Re: What does it mean????

        bettina@coaster .ch wrote:[color=blue]
        > I've sent all my PHP sites to the server and when calling it I receive
        > this message:
        >
        > Warning: session_start() : Cannot send session cookie - headers already
        > sent by (output started at /home/coaster/public_html/index.php:7) in
        > /home/coaster/public_html/index.php on line 18
        >
        > Help will be welcome!
        >[/color]

        It means your index.php sent some output to the browser on line 18. This could
        be a blank line or anything else which sends info to the browser.
        session_start() must be called before ANY output (including a DOCTYPE or
        anything else) is sent.

        What's on this line?

        P.S. obstart() just hides the real problem. Rather, you should figure out what
        the problem is and fix it.

        --
        =============== ===
        Remove the "x" from my email address
        Jerry Stuckle
        JDS Computer Training Corp.
        jstucklex@attgl obal.net
        =============== ===

        Comment

        • bettina@coaster.ch

          #5
          Re: What does it mean????

          Thank you! It functions!

          Comment

          Working...