|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2000-06-26 03:05 UTC] chris-php-bugs at digitaria dot com
session_start(); echo '<P> Session ID: ' . session_id() . '</P>'; echo '<P>destroy ' . (session_destroy() ? ' successful' : 'failed') . '</P>'; will always print failed. The temp file will not be removed, the browser will keep the same session cookie and the session variables will still be available. As far as I can tell, session_destroy() is a NOP. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 10:00:02 2025 UTC |
PHP.ini: session.save_handler = files session.save_path = D:\TEMP\PHPSessions <? session_start(); session_register('counter'); echo "<P>Reload count: " . @$counter++ . "</P>"; if ($counter < 10) { echo '<A HREF="bug_5231.php?PHPSESSID=' . session_id() . '">Reload</A>'; } else { echo "Hit reload limit. Destroying session"; session_destroy(); } ?> Observed behaviour is that the session count will be reach nine and stay there. session_destroy() will be called each time at that point, which appears to prevent counter's change to 10 from being written. However, the session still remains valid and so "Reload count: 9" will be displayed for all subsequent reloads. A working session handler will restart at zero after the session is destroyed.