note 96417 deleted from function.session-set-cookie-params by danbrown
| From: | danbrown@php.net | Date: | Fri, 26 Feb 2010 04:31:22 +0000 |
| Subject: | note 96417 deleted from function.session-set-cookie-params by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-166387@lists.php.net to get a copy of this message | ||
Note Submitter: phpprofessional dot us at gmail dot com
----
@ quintellarosa at yahoo dot com dot br
setcookie, in your example, causes PHP to send two Set-Cookie headers. The first, coming from your
cookie, and the second, coming from session_start. Since, the second setcookie header doesn't
overwrite the expiration date, it has no affect other than being an extra header.
I was experimenting with this myself and I found that when you give the $lifetime param for
session_set_cookie_params an int that is too big, it will reject it. Not sure if that's any
help.
Anyways, cheers for your post, it helped me locate a small bug in my sessions.