|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-02-15 14:58 UTC] tdtwisteruk at hotmal dot com
Description:
------------
The problem appear to be the wrong formating of the expiration date that cause meny browsers to ignore the session cookie.
I think I have manage to track the bug. It appears to be on the file /ext/session/session.c line 1119. I am currently working on a patch. It should be trivial.
Reproduce code:
---------------
session_set_cookie_params(
$lifetime,
$path,
$domain,
$isSecure,
$httponly
);
session_start();
Expected result:
----------------
frontend=90b770550657dbe845656805a1e9bfe0; expires=Sun, 15-Feb-09 15:53:53 GMT; path=/magento; domain=localhost; HttpOnly
Actual result:
--------------
frontend=90b770550657dbe845656805a1e9bfe0; expires=Sunday, 15-Feb-09 15:53:53 GMT; path=/magento; domain=localhost; HttpOnly
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 17:00:01 2025 UTC |
It appears that the browser behavior I mention earlyer was caused by domain=localhost attribute, even though I run the page from localhost. Anyway the cookie expirtion date is different from the session expiration. To fix this change line 1119 in ext/session/session.c to date_fmt = php_format_date("D, d-M-Y H:i:s T", sizeof("D, d-M-Y H:i:s T")-1, t, 0 TSRMLS_CC);