Session bug?
| From: | Richard Thomas | Date: | Sat, 14 Oct 2000 08:48:32 +0000 |
| Subject: | Session bug? | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-34995@lists.php.net to get a copy of this message | ||
Hey, I did a bug report on this but wanted to verify it was not my own
stupidity...
Compile with --enable-trans-sid
Use the final example session code, MINUS THE <?=SID?> since you shouldnt
need sid numbers with --enable-trans-sid..
PHP does auto add the SID information to ALL links.. BUT if you turn cookies
off the count gets hosed... If you add 1 to $count, it saves $count + 2, if
you * 2 to $count it saves $count * 4..
I have verified in the session files that is during Saving the information
that the problem occours.. and ONLY DURING MATH OPERATIONS..
Turn cookies back on and code starts working fine again..
<?php
session_register ("count");
$count++;
?>
Hello visitor, you have seen this page <? echo $count; ?> times.<p>
To continue, <A HREF="nextpage.php?">click here</A>
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Share information about yourself, create your own public profile at http://profiles.msn.com.