Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New Coder
    Join Date
    Aug 2006
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cannot send session cookie, cannot send session cahce limiter

    I am trying to create a user system for my website, when I log in I get these errors:
    Code:
    Warning: session_start(): Cannot send session cookie - headers already sent by (output started at c:\documents and settings\administrator\desktop\intranet\development\final\admin\main.php:9) in c:\documents and settings\administrator\desktop\intranet\development\final\admin\main.php on line 10
    
    Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at c:\documents and settings\administrator\desktop\intranet\development\final\admin\main.php:9) in c:\documents and settings\administrator\desktop\intranet\development\final\admin\main.php on line 10
    Can anyone tell me how to get around this? I have tried removing all the 'white space'.

  • #2
    Regular Coder googleit's Avatar
    Join Date
    Jul 2006
    Location
    birmingham, uk
    Posts
    189
    Thanks
    0
    Thanked 0 Times in 0 Posts
    have you put
    PHP Code:
    session_start() 
    on line 1?

  • #3
    Regular Coder
    Join Date
    Aug 2006
    Location
    UK, London, Dartford
    Posts
    221
    Thanks
    3
    Thanked 14 Times in 14 Posts
    Yeah that should be your first line in your script and make sure its not included anywere else in the script!

  • #4
    New Coder
    Join Date
    Aug 2006
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It is on the first line of the php code but before that I have all the HTML DOCTYPE etc. I take it I should put session_start() on the very first line before the HTML stuff?

    Thanks.

  • #5
    Regular Coder
    Join Date
    Aug 2006
    Location
    UK, London, Dartford
    Posts
    221
    Thanks
    3
    Thanked 14 Times in 14 Posts
    Should be the first line wraped in <?php and ?>

  • #6
    New Coder
    Join Date
    Aug 2006
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yep, it is the first line wrapped in the first set of PHP tags on the page.

  • #7
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    Quote Originally Posted by manicman
    I take it I should put session_start() on the very first line before the HTML stuff?
    Correct.

  • #8
    New Coder
    Join Date
    Aug 2006
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks, I have got it working now.


  •  

    Posting Permissions

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