php man page for session_regenerate_id

Query: session_regenerate_id

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

SESSION_REGENERATE_ID(3)						 1						  SESSION_REGENERATE_ID(3)

session_regenerate_id - Update the current session id with a newly generated one

SYNOPSIS
bool session_regenerate_id ([bool $delete_old_session = false])
DESCRIPTION
session_regenerate_id(3) will replace the current session id with a new one, and keep the current session information.
PARAMETERS
o $delete_old_session - Whether to delete the old associated session file or not.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
CHANGELOG
+--------+---------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------------+ | 4.3.3 | | | | | | | Since then, if session cookies are enabled, use | | | of session_regenerate_id(3) will also submit a | | | new session cookie with the new session id. | | | | | 5.1.0 | | | | | | | Added the $delete_old_session parameter. | | | | +--------+---------------------------------------------------+
EXAMPLES
Example #1 A session_regenerate_id(3) example <?php session_start(); $old_sessionid = session_id(); session_regenerate_id(); $new_sessionid = session_id(); echo "Old Session: $old_sessionid<br />"; echo "New Session: $new_sessionid<br />"; print_r($_SESSION); ?>
SEE ALSO
session_id(3), session_start(3), session_name(3). PHP Documentation Group SESSION_REGENERATE_ID(3)
Related Man Pages
session_register(3) - php
sessionhandler(3) - php
sessionhandlerinterface(3) - php
session_cache_expire(3) - php
session_unregister(3) - php
Similar Topics in the Unix Linux Community
session limit in php
PHP Session Cleaner 0.1 (Default branch)
In-Session Phishing
match all occurances of session id with one regex?
Session &quot;hijacking&quot; - Recover lost session