note 96417 added to function.session-set-cookie-params
| From: | phpprofessional dot us at gmail dot com | Date: | Fri, 26 Feb 2010 04:29:10 +0000 |
| Subject: | note 96417 added to function.session-set-cookie-params | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-166386@lists.php.net to get a copy of this message | ||
@ 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.
----
Server IP: 64.71.164.2
Probable Submitter: 76.169.154.75
----
Manual Page -- http://www.php.net/manual/en/function.session-set-cookie-params.php
Edit -- https://master.php.net/note/edit/96417
Del: integrated -- https://master.php.net/note/delete/96417/integrated
Del: useless -- https://master.php.net/note/delete/96417/useless
Del: bad code -- https://master.php.net/note/delete/96417/bad+code
Del: spam -- https://master.php.net/note/delete/96417/spam
Del: non-english -- https://master.php.net/note/delete/96417/non-english
Del: in docs -- https://master.php.net/note/delete/96417/in+docs
Del: other reasons-- https://master.php.net/note/delete/96417
Reject -- https://master.php.net/note/reject/96417
Search -- https://master.php.net/manage/user-notes.php