#1
  1. No Profile Picture
    Bart
    Guest
    Devshed Newbie (0 - 499 posts)
    Dear Forum,

    I have looked everywhere for an answer. For several days I've been trying to sort out why I can't set a cookie. I always get the following error message. As far as I can tell there are no blank lines or spaces before the openning <?. Is there a way to check? I am using Notepad as an editor. Does it attach some sort of file header? I really can't figure this one out. Seems like this should be so simple.

    <?SetCookie("NewCookie");?>

    Warning: Oops, php3_SetCookie called after header has been sent in
    /u/web/orchi5/setcookie.php3 on line 1

    Thanks,

    Bart
  2. #2
  3. No Profile Picture
    jpenix
    Guest
    Devshed Newbie (0 - 499 posts)
    Is it possible that your PHP is configured to auto-include a file that's sending output before it even gets to the top of your script??

    PHP4 will solve this problem with output buffering... then you can put Headers anywhere you want...

    But until then... :^(
  4. #3
  5. No Profile Picture
    Bart
    Guest
    Devshed Newbie (0 - 499 posts)
    Thanks,

    I checked the PHP configuration and both auto append and auto prepend are set as none.

    Any other ideas??

    Bart
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    1
    Rep Power
    0
    i tried this too, the only solution i got right now is deleting all the <html> tags from the page. just use
    <?php setcookie("cookiename", "cookievalue") ; ?>

    and only that in your document.

    i use notepad too!

    Han*

Similar Threads

  1. called too early to check prototype at mediawrap.cgi
    By jenniefer in forum Perl Programming
    Replies: 4
    Last Post: December 20th, 2003, 08:37 AM
  2. mail(), header, character set not recognized
    By mr_fitz in forum PHP Development
    Replies: 0
    Last Post: December 11th, 2003, 10:25 AM
  3. question about header()
    By miseria in forum PHP Development
    Replies: 2
    Last Post: December 9th, 2003, 04:38 AM
  4. Does _msize() always return EXACT size of malloc'ed block?
    By Jason Doucette in forum C Programming
    Replies: 10
    Last Post: November 29th, 2003, 12:24 AM

IMN logo majestic logo threadwatch logo seochat tools logo