Re: Re: sessions failing to persist
| From: | Michael R. Wayne | Date: | Tue, 04 May 2004 03:50:18 +0000 |
| Subject: | Re: Re: sessions failing to persist | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-185271@lists.php.net to get a copy of this message | ||
On Tue, May 04, 2004 at 12:35:31AM +0300, omer wrote:
> the problem suggest to me that you probably do not have the directory that
> the sessions get stored on the server side properly existing and
> permissioned. make sure that your php.ini defined location exists. also
> make sure that your php code is not over-riding your php.ini by defining a
> different location. also perhaps you have renamed the sessionid label from
> phpsessionid to somthing else? try testing by switching cookies completely
> off on you browser and then trying to go to the php script. youll then see
> the session# in the url field.
1) We never, ever use cookies for anything.
2) The sessionID directory exists and gets the values properly stored in
files which match the sessionID.
3) The ENTIRE php code I am using to test is listed below - it does not override
anything.
/\/\ \/\/
> rgrds,
> omer.
>
>
> "Michael R. Wayne" <phpuser@wayne47.com> wrote in message
> news:200405030440.i434eIMm022395@manor.msen.com...
> >
> > As I posted last week, I seem unable to have sessions persist. I
> > have ruled out https as a problem, the following simple script,
> > installed as xxx.php will generate a new session number every time
> > the field is filled in and "Submit" is hit.
> >
> > Note that I am not using cookies, the relevant session variables are:
> > Session Support enabled
> > session.auto_start On
> > session.use_cookies Off
> > session.use_trans_sid On
> >
> > When run, the session file appears to contain stage=1 but never is being
> > read.
> >
> > I suspect I'm missing something obvious, any pointers?
> >
> > /\/\ \/\/
> >
> > <?
> > if (!session_is_registered("stage")) {
> > $_SESSION["stage"] = 0;
> > $_POST['field'] = "";
> > session_register("stage");
> > }
> > ?>
> > <html> <head><title>PHP Test page</title></head>
> > <body>
> > <?
> > echo "Stage:"; echo $_SESSION["stage"];
> > echo " SessionID: "; echo session_id();
> > $_SESSION["stage"] = 1;
> > ?>
> > <form method=post action="xxx.php">
> > <input type=text maxlength=7 size=7 name=field value="<?echo
> $_POST['field']?>">
> > <input type=submit value="Submit">
> > </form>
> > <?
> > echo "Stage:"; echo $_SESSION["stage"];
> > ?>
> >
> > </body> </html>
>