PHP 4.0 Bug #5231 Updated: session_destroy() doesn't.

From: Date: Tue, 04 Jul 2000 16:42:53 +0000
Subject: PHP 4.0 Bug #5231 Updated: session_destroy() doesn't.
Groups: php.dev 
Request: Send a blank email to php-dev+get-23336@lists.php.net to get a copy of this message
ID: 5231 User Update by: chris-php-bugs@digitaria.com Status: Open Bug Type: Session related Description: session_destroy() doesn't. 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. Full Bug description available at: http://bugs.php.net/?id=5231

« previous php.dev (#23336) next »