note 55156 added to function.session-start
| From: | ethomas at csd dot abdn dot ac dot uk | Date: | Tue, 26 Jul 2005 18:34:15 +0000 |
| Subject: | note 55156 added to function.session-start | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-92502@lists.php.net to get a copy of this message | ||
I had a problem because I was using a session to store whether or not the the user wanted to save
their session for 7 days. Unfortunately I could not use session_set_cookie_params() because I had to
call it after a session_start and the default had been set. I got around this by calling
<?php
setcookie(session_name(),session_id(),time()+3600*24*7);
?>
After session_start() which undid the damage
----
Manual Page -- http://www.php.net/manual/en/function.session-start.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+55156
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55156&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55156&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55156&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55156&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55156&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55156&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+55156&report=yes
Search -- http://master.php.net/manage/user-notes.php