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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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: Sat Dec 21 16:01:28 2024 UTC