SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2003
    Location
    Switzerland
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Help, I'm getting error-messages

    Always when I call session_start() I'm getting the following error-messages:

    Warning: Cannot send session cookie - headers already sent by (output started at /opt/root/home/ ... :9)
    in /opt/root/home/ ... on line 7

    Warning: Cannot send session cache limiter - headers already sent (output started at /opt/root/home/ ... :9)
    in /opt/root/home/ ... on line 7

    Can someone help me? Thank you in advance!

    Tobias

  2. #2
    La la la la la bronze trophy lieut_data's Avatar
    Join Date
    Jun 2003
    Location
    Waterloo, ON
    Posts
    1,517
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your script is probably outputting HTML or text before you send your session headers. In order for sessions to work, they must be sent to the browser before any other code.

    You can either,
    a) send your session headers at the top of your scripts, or
    b) call ob_start() at the top of your code to buffer the output until the script is finished.
    My name is Steve, and I'm a super-villian.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jun 2003
    Location
    Switzerland
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    that works - thank you !!!


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
  •