Results 1 to 5 of 5

Thread: [RESOLVED] Can't Set Cookie

  1. #1
    Join Date
    Dec 2008

    resolved [RESOLVED] Can't Set Cookie

    I have a set cookie function supposed to run... But it keeps screaming:
    Warning: Cannot modify header information - headers already sent by (output started at D:\xampp\htdocs\www\Faction\index.php:1) in D:\xampp\htdocs\www\Faction\functions\do.php on line 11
    Now, I know what that means. Problem is, I haven't sent any output before using this. Heck, I even tried using a dummy setcookie function at the first line of index.php and it said the same. What's going on?

  2. #2
    Join Date
    Jan 2009
    Do you have any extra whitespace at the beginning of the file? Are you including any other files which might have whitespace? If all else fails do an ob_start and flush.

  3. #3
    Join Date
    Dec 2008
    Nope. And buffering doesn't work ):

  4. #4
    Join Date
    Aug 2004
    Make sure your scripts are saved either as plain ASCII text or as UTF-8 without the BOM (byte order mark). Otherwise that BOM will be output before the <?php tag no matter what you do.
    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

  5. #5
    Join Date
    Dec 2008
    You, my dear sir, are frickin' brilliant. Thank you!

Thread Information

Users Browsing this Thread

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

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