August 5th, 1999, 05:27 PM
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.
Warning: Oops, php3_SetCookie called after header has been sent in
/u/web/orchi5/setcookie.php3 on line 1
August 5th, 1999, 06:38 PM
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... :^(
August 6th, 1999, 12:55 PM
I checked the PHP configuration and both auto append and auto prepend are set as none.
Any other ideas??
October 16th, 2000, 05:25 PM
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!