Results 1 to 4 of 4

Thread: cookie problem?

  1. #1
    Join Date
    Oct 2001
    Location
    Miami,FL
    Posts
    612

    cookie problem?

    Warning: Cannot send session cookie - headers already sent by (output
    started at /home/saleitnl/public_html/testlog.php:7) in
    /home/saleitnl/public_html/testlog.php on line 8

    Warning: Cannot send session cache limiter - headers already sent (output
    started at /home/saleitnl/public_html/testlog.php:7) in
    /home/saleitnl/public_html/testlog.php on line 8


    any hlp?
    Joman Sierra
    http://www.dominet.net

  2. #2
    Hey,
    This is a very common problem.. before you set a cookie or start a session, make sure you dont have any blank spaces or echo statements. Basically, DO NOT send any information to the browser. Even an extra blank space can cause problems.

    hope that helps, if not, post your code here so that we can find the exact problem.

    kunal
    The Php Support Desk
    http://www.phpsupportdesk.com
    Custom programming - kunal @ e-phoria.com
    http://www.pingzine.com - Ping!Zine. the FREE, FRESH and EXCITING Web Hosting Magazine...

  3. #3
    i encountered this problem a lot, until I came across this magic line,
    ob_start();
    just put that at the start of your code and it will buffer the data preventing any errors, its never failed with me
    web:http://www.allabouthosting.co.uk
    email: [email protected]

  4. #4
    Join Date
    Aug 2002
    Location
    Baltimore, Maryland
    Posts
    580
    um...no...you MUST make sure your cookie goes before ANYTHING ELSE, even when sending such headers as "location: blah" or "http 1.1" etc... the cookies must come 1st.. php.net

Posting Permissions

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