note 68969 added to function.session-regenerate-id

From: Date: Thu, 17 Aug 2006 18:00:27 +0000
Subject: note 68969 added to function.session-regenerate-id
Groups: php.notes 
Request: Send a blank email to php-notes+get-116014@lists.php.net to get a copy of this message
If you are using cookies to store session ids and your php version is 4.3.2, session_regenerate_id() will not issue a cookie with the new id resulting in authentication failures. Here is my fix session_regenerate_id(); if(!version_compare(phpversion(),"4.3.3",">=")){ setcookie( session_name(), session_id(), ini_get("session.cookie_lifetime"), "/" ); } ---- Server IP: 66.163.161.117 Probable Submitter: 71.136.235.115 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.session-regenerate-id.php Edit -- https://master.php.net/note/edit/68969 Del: integrated -- https://master.php.net/note/delete/68969/integrated Del: useless -- https://master.php.net/note/delete/68969/useless Del: bad code -- https://master.php.net/note/delete/68969/bad+code Del: spam -- https://master.php.net/note/delete/68969/spam Del: non-english -- https://master.php.net/note/delete/68969/non-english Del: in docs -- https://master.php.net/note/delete/68969/in+docs Del: other reasons-- https://master.php.net/note/delete/68969 Reject -- https://master.php.net/note/reject/68969 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#116014) next »