session & register_globals setting

From: Date: Thu, 11 May 2000 08:19:53 +0000
Subject: session & register_globals setting
Groups: php.dev 
Request: Send a blank email to php-dev+get-18605@lists.php.net to get a copy of this message
Hi, after installing the RC2 the first session example provided in the PHP manual is not operating well since the register_globals setting in the php.ini is set on "Off" as a default: <?php session_register("count"); $count++; ?> Hello visitor, you have seen this page <? echo $count; ?> times.<p> <? # the <?=SID?> is necessary to preserve the session id # in the case that the user has disabled cookies ?> To continue, <A HREF="nextpage.php?<?=SID?>">click here</A> In order to use any variable we need to add the "$HTTP_*_VARS["var"] to reffer to it. My question is how do I reffer to a variable in a session, it is not any of the provided $HTTP_*_VARS[] (GET/POST/COOKIE/ENV). Another important question is: How do I set the SID to operate on my PHP so I will be able to maintain a session while the user browses in my site? I know that it should be set in the "--enable-trans-sid", but I use the win32 version, where all configuratin is made in the php.ini file, how do I do that from there? My PHP4.0RC2 is running on Win 98 with Apachec1.3.12. Thanks and sorry to bother, David.

« previous php.dev (#18605) next »