Session error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Titus

    Session error

    Hi,

    Just received the following error upon running some scripts that
    utilize sessions. Don't know what it means by "cache limiter". Can
    someone please clarify?

    I have a script called "displaypreowne d.php" that begins with
    "session_start( )" and a few lines later have a line
    "include("datab aseconnector.ph p")" and "include("stock display.php")"
    which in themself also have "session_start( )" in it. Don't know if
    these multiple "session_start( )" caused the error. I tried a test
    script with multiple lines of "session_start( )" without problem so I'm
    not too sure.

    Warning: Cannot send session cache limiter - headers already sent
    (output started at /stock/displaypreowned .php:8) in
    /stock/displaypreowned .php on line 9
  • Pedro Graca

    #2
    Re: Session error

    Titus wrote:[color=blue]
    > Warning: Cannot send session cache limiter - headers already sent
    > (output started at /stock/displaypreowned .php:8) in
    > /stock/displaypreowned .php on line 9[/color]

    You can't send HTML data before the headers (session_start( ),
    setcookie(), header(), maybe others).

    Line 8 of /stock/displaypreowned .php sends HTML data
    Line 9 tries to send a header.


    Either remove line 8 or put it after line 9
    or use output buffering


    specifically the ob_start() function

    --
    --= my mail box only accepts =--
    --= Content-Type: text/plain =--
    --= Size below 10001 bytes =--

    Comment

    Working...