|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66080 setcookie isn't setting cookie
Submitted: 2013-11-12 01:56 UTC Modified: 2013-11-25 21:32 UTC
From: rf14racingfan14 at gmail dot com Assigned: requinix (profile)
Status: Closed Package: Apache2 related
PHP Version: 5.5.5 OS: Windows
Private report: No CVE-ID: None
 [2013-11-12 01:56 UTC] rf14racingfan14 at gmail dot com
setcookie() will not set a cookie. It worked for me in PHP 5.4.7, but upon upgrading to PHP 5.5.5 the cookie will no longer be set. I tested in Opera 12, Chromium, Chrome and Opera 15. 

NOTE: I filed it under Apache2 as I didn't know what to file it under.

Test script:
// Example
setcookie("A", "B");

Expected result:
The cookie should be set.

Actual result:
The cookie isn't set.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-11-12 02:37 UTC]
-Status: Open +Status: Feedback
 [2013-11-12 02:37 UTC]
Find your php.ini and set
  error_reporting = -1
  display_errors = on
Restart Apache and use phpinfo() to confirm the new values.
Then try your code. Any errors or warnings?
 [2013-11-25 19:54 UTC] rf14racingfan at gmail dot com
No errors were returned, but upon upgrading to PHP 5.5.6 the problem went away and setcookie() now works.
 [2013-11-25 21:32 UTC]
-Status: Feedback +Status: Closed -Assigned To: +Assigned To: requinix
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 26 10:01:33 2024 UTC