php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1719 Oops, php3_SetCookie called after header has been sent in
Submitted: 1999-07-15 10:28 UTC Modified: 1999-07-15 11:58 UTC
From: ssosyud at chollian dot dacom dot co dot kr Assigned:
Status: Closed Package: Other
PHP Version: 3.0.9 OS: redhat 6.0
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ssosyud at chollian dot dacom dot co dot kr
New email:
PHP Version: OS:

 

 [1999-07-15 10:28 UTC] ssosyud at chollian dot dacom dot co dot kr
<?setcookie("yudcookie","",time());?>
<?setcookie("yudcookie","abcdefg",time()+3600);?>
the result is Oops, php3_SetCookie called after header has been sent in test.php3 #2
what is trouble in code?

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-07-15 11:58 UTC] sas at cvs dot php dot net
From the manual

Cookies must be sent before any other headers are sent (this is a restriction of Cookies, not PHP). This requires you to place calls to this function before any <html> or <head> tags. 

So, the error message you see tells you that you somewhere send data before the call to setcookie.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Nov 01 01:01:28 2024 UTC