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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: rf14racingfan14 at gmail dot com
New email:
PHP Version: OS:

 

 [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-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 23:01:30 2024 UTC