php.net |  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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
46 - 1 = ?
Subscribe to this entry?

 
 [2013-11-12 01:56 UTC] rf14racingfan14 at gmail dot com
Description:
------------
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:
---------------
<?php
// Example
setcookie("A", "B");
?>

Expected result:
----------------
The cookie should be set.

Actual result:
--------------
The cookie isn't set.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-11-12 02:37 UTC] requinix@php.net
-Status: Open +Status: Feedback
 [2013-11-12 02:37 UTC] requinix@php.net
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] requinix@php.net
-Status: Feedback +Status: Closed -Assigned To: +Assigned To: requinix
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri Dec 02 20:03:58 2022 UTC