From: [EMAIL PROTECTED] Operating system: windows PHP version: 4.2.1 PHP Bug Type: Session related Bug description: session register
I've been scratching my head over this for sometime now. I'm sure I'm doing something wrong and hope someone can help. The problem is simple: <?php session_start(); if (isset($HTTP_SESSION_VARS['count'])) { $HTTP_SESSION_VARS['count']++; } else { print "NOT registered:"; $HTTP_SESSION_VARS['count']=0; } ?> Hello visitor, you have seen this page <?php echo $HTTP_SESSION_VARS['count'] ?> times.<p> To continue, <A HREF="http://localhost/jobs4us/main.php?<?php echo SID?>">click here</A> -- The above code is available on the php site. Problem:every time I reload the above page, or link to it from another page, $HTTP_SESSION_VARS['count'] always shows 0. Why? I can see the session is saved in my temp file (size 1K), but when i reload the page, why does the code 'think' that the session is not registered? Of course, I tried session_is registered("count") but to no avail. Any help would be appreciated. -- Edit bug report at http://bugs.php.net/?id=17441&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=17441&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=17441&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=17441&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=17441&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=17441&r=support Expected behavior: http://bugs.php.net/fix.php?id=17441&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=17441&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=17441&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=17441&r=globals