www.webdeveloper.com
Results 1 to 4 of 4

Thread: Session Issue - Cannot Send?

Hybrid View

  1. #1
    Join Date
    May 2009
    Location
    Rochester, NY
    Posts
    364

    Session Issue - Cannot Send?

    Code:
    Warning: session_register() [function.session-register]: Cannot send session cookie - headers already sent by (output started at *URL*/choose.php:5) in *URL*/choose.php on line 7
    
    Warning: session_register() [function.session-register]: Cannot send session cache limiter - headers already sent (output started at *URL*/choose.php:5) in *URL*/choose.php on line 7

    Does anybody know what this means? How do I fix my sessions?

    Please note I've used *URL* in place of the actual URL for privacy.

    Thanks!

  2. #2
    Join Date
    Apr 2006
    Location
    Silicon Valley
    Posts
    20
    The "headers sent" error occurs when your code has already finished sending http headers and has begun sending http data and you try to send headers again. That means you're probably echoing some text or something before the session_register() call.

  3. #3
    Join Date
    May 2009
    Location
    Rochester, NY
    Posts
    364
    Well that was interesting. I wrote the code
    Code:
    session_register ("Time");
    , and I got an error. Thinking it may be the variable, I tried
    Code:
    session_register ("Times");
    , but it still did not work. I commented out the code and it worked. I tried writing
    Code:
    session_register ("TimeDate");
    , and it WORKED!

    It must have been the term. Sessions must not like it.

  4. #4
    Join Date
    May 2009
    Location
    Rochester, NY
    Posts
    364
    On second thought... maybe it was just because I put it above the header.
    This is strange...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles