ID: 36737 Updated by: [EMAIL PROTECTED] Reported By: morriss at r-can dot com -Status: Open +Status: Feedback Bug Type: Session related Operating System: Windows Server 2003 PHP Version: 5.1.2 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip Previous Comments: ------------------------------------------------------------------------ [2006-03-14 19:00:42] morriss at r-can dot com Description: ------------ I'm using the ISAPI filter in IIS6. With register_long_arrays off, the session variables are not always saved. Note that in my example, I found that assigning $sv=$_SESSION; always breaks it, but my webpage only does assignments like $sv=$_SESSION['idx'] yet is still broken. setting "register_long_arrays = On" in php.ini fixes the problem. Reproduce code: --------------- <head><title>test.php</title></head> <html> <body> <?php session_start(); $sv = $_SESSION; //broken! //$sv['idx'] = $_SESSION['idx']; //ok! if (isset($_SESSION['idx'])) $i = $_SESSION['idx'] + 1; else $i = 0; $_SESSION['idx'] = $i; session_write_close(); echo '<p>SESSION START: '.$sv['idx'].'</p>'; echo '<p>SESSION END: '.$_SESSION['idx'].'</p>'; ?> <a href="test.php">test</a> </body> </html> Expected result: ---------------- SESSION START: n SESSION END: n+1 (after clicking link) SESSION START: n+1 SESSION END: n+2 Actual result: -------------- SESSION START: n SESSION END: n+1 (does not change even after clicking link. Note that older session data is kept, if idx=3 when requesting the test page, then n=3) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36737&edit=1