php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18227 calling session_set_cookie_params breaks session_start
Submitted: 2002-07-08 09:07 UTC Modified: 2002-09-25 07:38 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: jeromedw at attbi dot com Assigned:
Status: Closed Package: Session related
PHP Version: 4.2.0 OS: FreeBSD 4.2
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: jeromedw at attbi dot com
New email:
PHP Version: OS:

 

 [2002-07-08 09:07 UTC] jeromedw at attbi dot com
calling session_set_cookie_params prior to session_start results in session_start not sending the cookie.  actual
code squence is 

<?
    session_name( test" );
    session_set_cookie_params( time() + 21*24*3600);

    session_start();
?>

Headers are checked using tcpflow.  Removing the session_set_cookie_params sends the cookie.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-17 08:06 UTC] jgillap at cogeco dot ca
This problem is also evident in Windows XP. Reproduced under the latest version of php and apache as of September 17th 2002.
 [2002-09-25 07:38 UTC] sas@php.net
Just remove the time() call -- you are dealing with an offset to the current time, not with unix timestamp.  Maybe Windows has a problem with the date 11-Jul-2035..
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 02 12:01:36 2025 UTC