Session variables persistency

This is a multi-part message in MIME format.

------=_NextPart_000_0008_01C80E65.98892670
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I have an "index.php" page, near the top of which this line

if (!isset($_SESSION['run_id'])) {$_SESSION['run_id']=3Dtime();}

produces a persistent run id. I can close that page and - as long as I =
do not close the browser - I can come back and continue from where I =
was, thanks to the session administration. It works fine.

A bit down on the same page I have the following sequence - a link, =
disguised as a button:

<FORM METHOD=3D"GET" ACTION=3D"./Documentation/users_guide.php" =
style=3D"border-style:solid; border-width:0px; border-color:black; =
padding:5px; margin:0px;" TARGET=3D"_blank">
<INPUT TYPE=3DSUBMIT Value=3D"User=B4s Guide" style=3D"color: maroon; =
font-family:Times New Roman; font-size: 12px; font-weight: bold; =
width:90px; height:25px; padding-bottom: 0; " >
</FORM>

The page "users_guide.php" is quite plain - no interaction with user or =
anything else. It does not use any session variables. It opens quite ok. =
To close it I use the cross in the upper right corner (Windows).

But ... When I come back to "index.php", I get

isset($_SESSION['run_id'])=3DFALSE

and thereby a new run id!

I have a number of "fake buttons" like this on that page and they all =
have the same effect on the run id. In one of them the addressed page =
actually uses the run id. That works ok, so I know it was not destroyed =
before the button was pressed.
By the way - if I use a simple link instead, the run id is persistent as =
it should be.

Any idea of how I can get around this (without going back to simple =
links - they don't look nice)?

/ Erik


------=_NextPart_000_0008_01C80E65.98892670
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.6000.16544" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>I have an "index.php" page, near the =
top of which
this line</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#ff0000 size=3D2>if =
(!isset($_SESSION['run_id']))
{$_SESSION['run_id']=3Dtime();}</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>produces a persistent run id. I can =
close that page
and - as long as I do </FONT><FONT face=3DArial size=3D2>not close the =
browser - I
can come back and continue from where I was, </FONT><FONT face=3DArial
size=3D2>thanks to the session administration. It works =
fine.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>A bit down on the same page I have the =
following
sequence - a link, </FONT><FONT face=3DArial size=3D2>disguised as a
button:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT color=3D#ff0000><FONT face=3DArial size=3D2><FORM =
METHOD=3D"GET"
ACTION=3D"./Documentation/users_guide.php" </FONT><FONT face=3DArial
size=3D2>style=3D"border-style:solid; border-width:0px; =
border-color:black;
</FONT></FONT><FONT color=3D#ff0000><FONT face=3DArial =
size=3D2>padding:5px;
margin:0px;" TARGET=3D"_blank"><BR><INPUT TYPE=3DSUBMIT =
Value=3D"User=B4s Guide"
style=3D"color: maroon; </FONT><FONT face=3DArial =
size=3D2>font-family:Times New
Roman; font-size: 12px; font-weight: bold; </FONT></FONT><FONT =
face=3DArial
color=3D#ff0000 size=3D2>width:90px; height:25px; padding-bottom: 0; "
><BR></FORM></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>The page "users_guide.php" is quite =
plain - no
interaction with user or </FONT><FONT face=3DArial size=3D2>anything =
else. It does
not use any session variables. It opens quite ok. To close it I use the =
cross in
the upper right corner </FONT><FONT face=3DArial =
size=3D2>(Windows).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>But ... </FONT><FONT face=3DArial =
size=3D2>When I come
back to "index.php", I get </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#ff0000
size=3D2>isset($_SESSION['run_id'])=3DFALSE</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>and thereby a new run id!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I have a number of "fake buttons" like =
this on that
page and they all have the same </FONT><FONT face=3DArial =
size=3D2>effect on
the run id. In one of them the addressed page actually uses the =
</FONT><FONT
face=3DArial size=3D2>run id. That works ok, so I know it was not =
destroyed before
the button was pressed.<BR>By the way - if I use a simple link instead, =
the run
id is persistent as </FONT><FONT face=3DArial size=3D2>it should =
be.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Any idea of how I can get around this =
(without
going back to simple </FONT><FONT face=3DArial size=3D2>links - they =
don't look
nice)?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT><BR><FONT face=3DArial =
size=3D2>/
Erik</FONT></DIV>
<DIV><FONT face=3DArial><BR><FONT =
size=3D2></FONT></FONT> </DIV></BODY></HTML>

------=_NextPart_000_0008_01C80E65.98892670--
Erik Kullberg [ So, 14 Oktober 2007 13:24 ] [ ID #1844550 ]

Re: Session variables persistency

don't know wat u want exactly but you can set session to expire after
a certain time even if browser is closed

session_cache_expire(10); // set to expire after 10 mins
session_start();
$_SESSION['run_id']=3Dtime();
if (!isset($_SESSION['run_id'])) {$_SESSION['run_id']=3Dtime();}

---- when do you want session destroyed, after what effect?




Yakuza
-----------------------
=E7=A7=81=E3=81=AF=E3=82=92=E6=94=AF=E9=85=8D=E3=81=99=E3=82 =8B
http://www.samamanda.com


On Oct 14, 12:24=C2=A0pm, "Erik Kullberg" <erik.kullb... [at] telia.com> wrote:
> I have an "index.php" page, near the top of which this line
>
> if (!isset($_SESSION['run_id'])) {$_SESSION['run_id']=3Dtime();}
>
> produces a persistent run id. I can close that page and - as long as I do=
not close the browser - I can come back and continue from where I was, tha=
nks to the session administration. It works fine.
>
> A bit down on the same page I have the following sequence - a link, disgu=
ised as a button:
>
> <FORM METHOD=3D"GET" ACTION=3D"./Documentation/users_guide.php" style=3D"=
border-style:solid; border-width:0px; border-color:black; padding:5px; marg=
in:0px;" TARGET=3D"_blank">
> <INPUT TYPE=3DSUBMIT Value=3D"User=C2=B4s Guide" style=3D"color: maroon; =
font-family:Times New Roman; font-size: 12px; font-weight: bold; width:90px=
; height:25px; padding-bottom: 0; " >
> </FORM>
>
> The page "users_guide.php" is quite plain - no interaction with user or a=
nything else. It does not use any session variables. It opens quite ok. To =
close it I use the cross in the upper right corner (Windows).
>
> But ... When I come back to "index.php", I get
>
> isset($_SESSION['run_id'])=3DFALSE
>
> and thereby a new run id!
>
> I have a number of "fake buttons" like this on that page and they all hav=
e the same effect on the run id. In one of them the addressed page actually=
uses the run id. That works ok, so I know it was not destroyed before the =
button was pressed.
> By the way - if I use a simple link instead, the run id is persistent as =
it should be.
>
> Any idea of how I can get around this (without going back to simple links=
- they don't look nice)?
>
> / Erik
yakuza [ Do, 18 Oktober 2007 16:20 ] [ ID #1848337 ]

Re: Session variables persistency

I do not want the session destroyed, but I get it destroyed after visiting
the described link. I cannot understand why.
/ Erik


"yakuza" <xentraz [at] hotmail.com> skrev i meddelandet
news:1192717259.539807.40700 [at] i38g2000prf.googlegroups.com...
don't know wat u want exactly but you can set session to expire after
a certain time even if browser is closed

session_cache_expire(10); // set to expire after 10 mins
session_start();
$_SESSION['run_id']=time();
if (!isset($_SESSION['run_id'])) {$_SESSION['run_id']=time();}

---- when do you want session destroyed, after what effect?




Yakuza
-----------------------
???????
http://www.samamanda.com


On Oct 14, 12:24 pm, "Erik Kullberg" <erik.kullb... [at] telia.com> wrote:
> I have an "index.php" page, near the top of which this line
>
> if (!isset($_SESSION['run_id'])) {$_SESSION['run_id']=time();}
>
> produces a persistent run id. I can close that page and - as long as I do
> not close the browser - I can come back and continue from where I was,
> thanks to the session administration. It works fine.
>
> A bit down on the same page I have the following sequence - a link,
> disguised as a button:
>
> <FORM METHOD="GET" ACTION="./Documentation/users_guide.php"
> style="border-style:solid; border-width:0px; border-color:black;
> padding:5px; margin:0px;" TARGET="_blank">
> <INPUT TYPE=SUBMIT Value="Userīs Guide" style="color: maroon;
> font-family:Times New Roman; font-size: 12px; font-weight: bold;
> width:90px; height:25px; padding-bottom: 0; " >
> </FORM>
>
> The page "users_guide.php" is quite plain - no interaction with user or
> anything else. It does not use any session variables. It opens quite ok.
> To close it I use the cross in the upper right corner (Windows).
>
> But ... When I come back to "index.php", I get
>
> isset($_SESSION['run_id'])=FALSE
>
> and thereby a new run id!
>
> I have a number of "fake buttons" like this on that page and they all have
> the same effect on the run id. In one of them the addressed page actually
> uses the run id. That works ok, so I know it was not destroyed before the
> button was pressed.
> By the way - if I use a simple link instead, the run id is persistent as
> it should be.
>
> Any idea of how I can get around this (without going back to simple
> links - they don't look nice)?
>
> / Erik
Erik Kullberg [ Do, 18 Oktober 2007 19:27 ] [ ID #1848345 ]

Re: Session variables persistency

..oO(Erik Kullberg)

>I have made an example, see the three attached files.

Please don't post attachments to text-only groups (and no HTML like in
your first posting). Many newsservers will filter that out or even
reject the entire posting. Upload them to some webspace and post a URL.

>Put them in the same
>directory and run them, and you will see what I mean.

If you need help, you should make it as easy as possible for us to help
you. Don't expect us to copy files to our own servers (if we have one
available at all). A URL to a test case, maybe with a way to also
download the script's sources if necessary, works always best.

Micha
Michael Fesser [ Do, 18 Oktober 2007 23:18 ] [ ID #1848356 ]

Re: Session variables persistency

See http://kueng.se/session_test/page1.php

As you can see everything works fine as long as you can get back by use of a
link. If there is no link (so you have to get back the hard way) the session
ID will be destroyed.
Do you know of a cure for this?
/ Erik


"yakuza" <xentraz [at] hotmail.com> skrev i meddelandet
news:1192717259.539807.40700 [at] i38g2000prf.googlegroups.com...
don't know wat u want exactly but you can set session to expire after
a certain time even if browser is closed

session_cache_expire(10); // set to expire after 10 mins
session_start();
$_SESSION['run_id']=time();
if (!isset($_SESSION['run_id'])) {$_SESSION['run_id']=time();}

---- when do you want session destroyed, after what effect?




Yakuza
-----------------------
???????
http://www.samamanda.com


On Oct 14, 12:24 pm, "Erik Kullberg" <erik.kullb... [at] telia.com> wrote:
> I have an "index.php" page, near the top of which this line
>
> if (!isset($_SESSION['run_id'])) {$_SESSION['run_id']=time();}
>
> produces a persistent run id. I can close that page and - as long as I do
> not close the browser - I can come back and continue from where I was,
> thanks to the session administration. It works fine.
>
> A bit down on the same page I have the following sequence - a link,
> disguised as a button:
>
> <FORM METHOD="GET" ACTION="./Documentation/users_guide.php"
> style="border-style:solid; border-width:0px; border-color:black;
> padding:5px; margin:0px;" TARGET="_blank">
> <INPUT TYPE=SUBMIT Value="Userīs Guide" style="color: maroon;
> font-family:Times New Roman; font-size: 12px; font-weight: bold;
> width:90px; height:25px; padding-bottom: 0; " >
> </FORM>
>
> The page "users_guide.php" is quite plain - no interaction with user or
> anything else. It does not use any session variables. It opens quite ok.
> To close it I use the cross in the upper right corner (Windows).
>
> But ... When I come back to "index.php", I get
>
> isset($_SESSION['run_id'])=FALSE
>
> and thereby a new run id!
>
> I have a number of "fake buttons" like this on that page and they all have
> the same effect on the run id. In one of them the addressed page actually
> uses the run id. That works ok, so I know it was not destroyed before the
> button was pressed.
> By the way - if I use a simple link instead, the run id is persistent as
> it should be.
>
> Any idea of how I can get around this (without going back to simple
> links - they don't look nice)?
>
> / Erik
Erik Kullberg [ Fr, 19 Oktober 2007 00:32 ] [ ID #1848357 ]

Re: Session variables persistency

This is a multi-part message in MIME format.

------=_NextPart_000_000C_01C811EA.D66398D0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Suddenly it works on this external server. It still does not work on my =
internal server.
Anyway - it seems it is not a php problem.

/ Erik
"Erik Kullberg" <erik.kullberg [at] telia.com> skrev i meddelandet =
news:80nQi.11276$ZA.7406 [at] newsb.telia.net...
I have an "index.php" page, near the top of which this line

if (!isset($_SESSION['run_id'])) {$_SESSION['run_id']=3Dtime();}

produces a persistent run id. I can close that page and - as long as I =
do not close the browser - I can come back and continue from where I =
was, thanks to the session administration. It works fine.

A bit down on the same page I have the following sequence - a link, =
disguised as a button:

<FORM METHOD=3D"GET" ACTION=3D"./Documentation/users_guide.php" =
style=3D"border-style:solid; border-width:0px; border-color:black; =
padding:5px; margin:0px;" TARGET=3D"_blank">
<INPUT TYPE=3DSUBMIT Value=3D"User=B4s Guide" style=3D"color: maroon; =
font-family:Times New Roman; font-size: 12px; font-weight: bold; =
width:90px; height:25px; padding-bottom: 0; " >
</FORM>

The page "users_guide.php" is quite plain - no interaction with user =
or anything else. It does not use any session variables. It opens quite =
ok. To close it I use the cross in the upper right corner (Windows).

But ... When I come back to "index.php", I get

isset($_SESSION['run_id'])=3DFALSE

and thereby a new run id!

I have a number of "fake buttons" like this on that page and they all =
have the same effect on the run id. In one of them the addressed page =
actually uses the run id. That works ok, so I know it was not destroyed =
before the button was pressed.
By the way - if I use a simple link instead, the run id is persistent =
as it should be.

Any idea of how I can get around this (without going back to simple =
links - they don't look nice)?

/ Erik


------=_NextPart_000_000C_01C811EA.D66398D0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.6000.16544" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Suddenly it works on this external =
server. It
still does not work on my internal server. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Anyway - it seems it is not a php
problem.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>/ Erik</FONT></DIV>
<BLOCKQUOTE dir=3Dltr
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Erik Kullberg" <<A
=
href=3D"mailto:erik.kullberg [at] telia.com">erik.kullberg [at] telia. com</A>> =
skrev i
meddelandet <A
=
href=3D"news:80nQi.11276$ZA.7406 [at] newsb.telia.net">news:80nQi .11276$ZA.740=
6 [at] newsb.telia.net</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>I have an "index.php" page, near the =
top of which
this line</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#ff0000 size=3D2>if =
(!isset($_SESSION['run_id']))
{$_SESSION['run_id']=3Dtime();}</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>produces a persistent run id. I can =
close that
page and - as long as I do </FONT><FONT face=3DArial size=3D2>not =
close the
browser - I can come back and continue from where I was, </FONT><FONT
face=3DArial size=3D2>thanks to the session administration. It works
fine.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>A bit down on the same page I have =
the following
sequence - a link, </FONT><FONT face=3DArial size=3D2>disguised as a
button:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT color=3D#ff0000><FONT face=3DArial size=3D2><FORM =
METHOD=3D"GET"
ACTION=3D"./Documentation/users_guide.php" </FONT><FONT face=3DArial
size=3D2>style=3D"border-style:solid; border-width:0px; =
border-color:black;
</FONT></FONT><FONT color=3D#ff0000><FONT face=3DArial =
size=3D2>padding:5px;
margin:0px;" TARGET=3D"_blank"><BR><INPUT TYPE=3DSUBMIT =
Value=3D"User=B4s Guide"
style=3D"color: maroon; </FONT><FONT face=3DArial =
size=3D2>font-family:Times New
Roman; font-size: 12px; font-weight: bold; </FONT></FONT><FONT =
face=3DArial
color=3D#ff0000 size=3D2>width:90px; height:25px; padding-bottom: 0; " =

><BR></FORM></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>The page "users_guide.php" is quite =
plain - no
interaction with user or </FONT><FONT face=3DArial size=3D2>anything =
else. It does
not use any session variables. It opens quite ok. To close it I use =
the cross
in the upper right corner </FONT><FONT face=3DArial
size=3D2>(Windows).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>But ... </FONT><FONT face=3DArial =
size=3D2>When I
come back to "index.php", I get </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#ff0000
size=3D2>isset($_SESSION['run_id'])=3DFALSE</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>and thereby a new run =
id!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I have a number of "fake buttons" =
like this on
that page and they all have the same </FONT><FONT face=3DArial
size=3D2>effect on the run id. In one of them the addressed page =
actually uses
the </FONT><FONT face=3DArial size=3D2>run id. That works ok, so I =
know it was not
destroyed before the button was pressed.<BR>By the way - if I use a =
simple
link instead, the run id is persistent as </FONT><FONT face=3DArial =
size=3D2>it
should be.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Any idea of how I can get around this =
(without
going back to simple </FONT><FONT face=3DArial size=3D2>links - they =
don't look
nice)?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT><BR><FONT face=3DArial =
size=3D2>/
Erik</FONT></DIV>
<DIV><FONT face=3DArial><BR><FONT
size=3D2></FONT></FONT> </DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_000C_01C811EA.D66398D0--
Erik Kullberg [ Fr, 19 Oktober 2007 00:56 ] [ ID #1849387 ]

Re: Session variables persistency

the session id stays the same for me. there is nothing in the code
that would destroy ses id. maybe you are rejecting your own cookies,
lol




On 18 Oct, 23:32, "Erik Kullberg" <erik.kullb... [at] telia.com> wrote:
> See http://kueng.se/session_test/page1.php
>
> As you can see everything works fine as long as you can get back by use o=
f a
> link. If there is no link (so you have to get back the hard way) thesessi=
on
> ID will be destroyed.
> Do you know of a cure for this?
> / Erik
>
> "yakuza" <xent... [at] hotmail.com> skrev i meddelandetnews:1192717259.539807.=
40700 [at] i38g2000prf.googlegroups.com...
> don't know wat u want exactly but you can setsessionto expire after
> a certain time even if browser is closed
>
> session_cache_expire(10); // set to expire after 10 mins
> session_start();
> $_SESSION['run_id']=3Dtime();
> if (!isset($_SESSION['run_id'])) {$_SESSION['run_id']=3Dtime();}
>
> ---- when do you wantsessiondestroyed, after what effect?
>
> Yakuza
> -----------------------
> ???????http://www.samamanda.com
>
> On Oct 14, 12:24 pm, "Erik Kullberg" <erik.kullb... [at] telia.com> wrote:
>
> > I have an "index.php" page, near the top of which this line
>
> > if (!isset($_SESSION['run_id'])) {$_SESSION['run_id']=3Dtime();}
>
> > produces a persistent run id. I can close that page and - as long as I =
do
> > not close the browser - I can come back and continue from where I was,
> > thanks to thesessionadministration. It works fine.
>
> > A bit down on the same page I have the following sequence - a link,
> > disguised as a button:
>
> > <FORM METHOD=3D"GET" ACTION=3D"./Documentation/users_guide.php"
> > style=3D"border-style:solid; border-width:0px; border-color:black;
> > padding:5px; margin:0px;" TARGET=3D"_blank">
> > <INPUT TYPE=3DSUBMIT Value=3D"User=B4s Guide" style=3D"color: maroon;
> > font-family:Times New Roman; font-size: 12px; font-weight: bold;
> > width:90px; height:25px; padding-bottom: 0; " >
> > </FORM>
>
> > The page "users_guide.php" is quite plain - no interaction with user or
> > anything else. It does not use anysessionvariables. It opens quite ok.
> > To close it I use the cross in the upper right corner (Windows).
>
> > But ... When I come back to "index.php", I get
>
> > isset($_SESSION['run_id'])=3DFALSE
>
> > and thereby a new run id!
>
> > I have a number of "fake buttons" like this on that page and they all h=
ave
> > the same effect on the run id. In one of them the addressed page actual=
ly
> > uses the run id. That works ok, so I know it was not destroyed before t=
he
> > button was pressed.
> > By the way - if I use a simple link instead, the run id is persistent as
> > it should be.
>
> > Any idea of how I can get around this (without going back to simple
> > links - they don't look nice)?
>
> > / Erik
yakuza [ Sa, 20 Oktober 2007 20:50 ] [ ID #1850088 ]

Re: Session variables persistency

This is a multi-part message in MIME format.

------=_NextPart_000_000C_01C816DE.6B013090
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I have made some systematical tests, see =
http://kueng.se/session_test/page1.php
Maybe it is time to reinstall Apache and PHP, but I would like to know a =
little more, so I can avoid to get the same result again.
/ Erik
"Erik Kullberg" <erik.kullberg [at] telia.com> skrev i meddelandet =
news:80nQi.11276$ZA.7406 [at] newsb.telia.net...
I have an "index.php" page, near the top of which this line

if (!isset($_SESSION['run_id'])) {$_SESSION['run_id']=3Dtime();}

produces a persistent run id. I can close that page and - as long as I =
do not close the browser - I can come back and continue from where I =
was, thanks to the session administration. It works fine.

A bit down on the same page I have the following sequence - a link, =
disguised as a button:

<FORM METHOD=3D"GET" ACTION=3D"./Documentation/users_guide.php" =
style=3D"border-style:solid; border-width:0px; border-color:black; =
padding:5px; margin:0px;" TARGET=3D"_blank">
<INPUT TYPE=3DSUBMIT Value=3D"User=B4s Guide" style=3D"color: maroon; =
font-family:Times New Roman; font-size: 12px; font-weight: bold; =
width:90px; height:25px; padding-bottom: 0; " >
</FORM>

The page "users_guide.php" is quite plain - no interaction with user =
or anything else. It does not use any session variables. It opens quite =
ok. To close it I use the cross in the upper right corner (Windows).

But ... When I come back to "index.php", I get

isset($_SESSION['run_id'])=3DFALSE

and thereby a new run id!

I have a number of "fake buttons" like this on that page and they all =
have the same effect on the run id. In one of them the addressed page =
actually uses the run id. That works ok, so I know it was not destroyed =
before the button was pressed.
By the way - if I use a simple link instead, the run id is persistent =
as it should be.

Any idea of how I can get around this (without going back to simple =
links - they don't look nice)?

/ Erik


------=_NextPart_000_000C_01C816DE.6B013090
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.6000.16544" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I have made some systematical =
tests, see <A
class=3Dinline href=3D"http://kueng.se/session_test/page1.php" =
target=3D_blank><FONT
face=3D"Times New Roman"
size=3D3>http://kueng.se/session_test/page1.php</FONT></A></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Maybe it is time to reinstall Apache =
and PHP, but I
would like to know a little more, so I can avoid to get the same result
again.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>/ Erik</FONT></DIV>
<BLOCKQUOTE dir=3Dltr
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Erik Kullberg" <<A
=
href=3D"mailto:erik.kullberg [at] telia.com">erik.kullberg [at] telia. com</A>> =
skrev i
meddelandet <A
=
href=3D"news:80nQi.11276$ZA.7406 [at] newsb.telia.net">news:80nQi .11276$ZA.740=
6 [at] newsb.telia.net</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>I have an "index.php" page, near the =
top of which
this line</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#ff0000 size=3D2>if =
(!isset($_SESSION['run_id']))
{$_SESSION['run_id']=3Dtime();}</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>produces a persistent run id. I can =
close that
page and - as long as I do </FONT><FONT face=3DArial size=3D2>not =
close the
browser - I can come back and continue from where I was, </FONT><FONT
face=3DArial size=3D2>thanks to the session administration. It works
fine.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>A bit down on the same page I have =
the following
sequence - a link, </FONT><FONT face=3DArial size=3D2>disguised as a
button:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT color=3D#ff0000><FONT face=3DArial size=3D2><FORM =
METHOD=3D"GET"
ACTION=3D"./Documentation/users_guide.php" </FONT><FONT face=3DArial
size=3D2>style=3D"border-style:solid; border-width:0px; =
border-color:black;
</FONT></FONT><FONT color=3D#ff0000><FONT face=3DArial =
size=3D2>padding:5px;
margin:0px;" TARGET=3D"_blank"><BR><INPUT TYPE=3DSUBMIT =
Value=3D"User=B4s Guide"
style=3D"color: maroon; </FONT><FONT face=3DArial =
size=3D2>font-family:Times New
Roman; font-size: 12px; font-weight: bold; </FONT></FONT><FONT =
face=3DArial
color=3D#ff0000 size=3D2>width:90px; height:25px; padding-bottom: 0; " =

><BR></FORM></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>The page "users_guide.php" is quite =
plain - no
interaction with user or </FONT><FONT face=3DArial size=3D2>anything =
else. It does
not use any session variables. It opens quite ok. To close it I use =
the cross
in the upper right corner </FONT><FONT face=3DArial
size=3D2>(Windows).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>But ... </FONT><FONT face=3DArial =
size=3D2>When I
come back to "index.php", I get </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#ff0000
size=3D2>isset($_SESSION['run_id'])=3DFALSE</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>and thereby a new run =
id!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I have a number of "fake buttons" =
like this on
that page and they all have the same </FONT><FONT face=3DArial
size=3D2>effect on the run id. In one of them the addressed page =
actually uses
the </FONT><FONT face=3DArial size=3D2>run id. That works ok, so I =
know it was not
destroyed before the button was pressed.<BR>By the way - if I use a =
simple
link instead, the run id is persistent as </FONT><FONT face=3DArial =
size=3D2>it
should be.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Any idea of how I can get around this =
(without
going back to simple </FONT><FONT face=3DArial size=3D2>links - they =
don't look
nice)?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT><BR><FONT face=3DArial =
size=3D2>/
Erik</FONT></DIV>
<DIV><FONT face=3DArial><BR><FONT
size=3D2></FONT></FONT> </DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_000C_01C816DE.6B013090--
Erik Kullberg [ Do, 25 Oktober 2007 08:13 ] [ ID #1854487 ]

Re: Session variables persistency

Erik Kullberg wrote:
> I have an "index.php" page, near the top of which this line
>
> if (!isset($_SESSION['run_id'])) {$_SESSION['run_id']=time();}
>
> produces a persistent run id. I can close that page and - as long as I
> do not close the browser - I can come back and continue from where I
> was, thanks to the session administration. It works fine.
>
> A bit down on the same page I have the following sequence - a link,
> disguised as a button:
>
> <FORM METHOD="GET" ACTION="./Documentation/users_guide.php"
> style="border-style:solid; border-width:0px; border-color:black;
> padding:5px; margin:0px;" TARGET="_blank">
> <INPUT TYPE=SUBMIT Value="Userīs Guide" style="color: maroon;
> font-family:Times New Roman; font-size: 12px; font-weight: bold;
> width:90px; height:25px; padding-bottom: 0; " >
> </FORM>
>
> The page "users_guide.php" is quite plain - no interaction with user or
> anything else. It does not use any session variables. It opens quite ok.
> To close it I use the cross in the upper right corner (Windows).
>
> But ... When I come back to "index.php", I get
>
> isset($_SESSION['run_id'])=FALSE
>
> and thereby a new run id!
>
> I have a number of "fake buttons" like this on that page and they all
> have the same effect on the run id. In one of them the addressed page
> actually uses the run id. That works ok, so I know it was not destroyed
> before the button was pressed.
> By the way - if I use a simple link instead, the run id is persistent as
> it should be.
>
> Any idea of how I can get around this (without going back to simple
> links - they don't look nice)?
>
> / Erik
>
>

I doubt this is PHP or Apache. It sounds like your browser is clearing
cookies when you close the window.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex [at] attglobal.net
==================
Jerry Stuckle [ Do, 25 Oktober 2007 15:05 ] [ ID #1854488 ]

Re: Session variables persistency

Jerry, you are a genius!
I installed and ran Netscape v.8 and there everything is ok - no red results
in my test table!
I also reinstalled Explorer, but that had no effect.
Any idea of how to make Explorer behave?

/ Erik


"Jerry Stuckle" <jstucklex [at] attglobal.net> skrev i meddelandet
news:mNOdnbTTpogrCb3anZ2dnUVZ_tfinZ2d [at] comcast.com...
> Erik Kullberg wrote:
>> I have an "index.php" page, near the top of which this line
>> if (!isset($_SESSION['run_id'])) {$_SESSION['run_id']=time();}
>> produces a persistent run id. I can close that page and - as long as I
>> do not close the browser - I can come back and continue from where I was,
>> thanks to the session administration. It works fine.
>> A bit down on the same page I have the following sequence - a link,
>> disguised as a button:
>> <FORM METHOD="GET" ACTION="./Documentation/users_guide.php"
>> style="border-style:solid; border-width:0px; border-color:black;
>> padding:5px; margin:0px;" TARGET="_blank">
>> <INPUT TYPE=SUBMIT Value="Userīs Guide" style="color: maroon;
>> font-family:Times New Roman; font-size: 12px; font-weight: bold;
>> width:90px; height:25px; padding-bottom: 0; " >
>> </FORM>
>> The page "users_guide.php" is quite plain - no interaction with user or
>> anything else. It does not use any session variables. It opens quite ok.
>> To close it I use the cross in the upper right corner (Windows).
>> But ... When I come back to "index.php", I get
>> isset($_SESSION['run_id'])=FALSE
>> and thereby a new run id!
>> I have a number of "fake buttons" like this on that page and they all
>> have the same effect on the run id. In one of them the addressed page
>> actually uses the run id. That works ok, so I know it was not destroyed
>> before the button was pressed.
>> By the way - if I use a simple link instead, the run id is persistent as
>> it should be.
>> Any idea of how I can get around this (without going back to simple
>> links - they don't look nice)?
>>
>> / Erik
>>
>>
>
> I doubt this is PHP or Apache. It sounds like your browser is clearing
> cookies when you close the window.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstucklex [at] attglobal.net
> ==================
>
Erik Kullberg [ Fr, 26 Oktober 2007 00:08 ] [ ID #1854493 ]

Re: Session variables persistency

Erik Kullberg wrote:
> "Jerry Stuckle" <jstucklex [at] attglobal.net> skrev i meddelandet
> news:mNOdnbTTpogrCb3anZ2dnUVZ_tfinZ2d [at] comcast.com...
>> Erik Kullberg wrote:
>>> I have an "index.php" page, near the top of which this line
>>> if (!isset($_SESSION['run_id'])) {$_SESSION['run_id']=time();}
>>> produces a persistent run id. I can close that page and - as long as I
>>> do not close the browser - I can come back and continue from where I was,
>>> thanks to the session administration. It works fine.
>>> A bit down on the same page I have the following sequence - a link,
>>> disguised as a button:
>>> <FORM METHOD="GET" ACTION="./Documentation/users_guide.php"
>>> style="border-style:solid; border-width:0px; border-color:black;
>>> padding:5px; margin:0px;" TARGET="_blank">
>>> <INPUT TYPE=SUBMIT Value="Userīs Guide" style="color: maroon;
>>> font-family:Times New Roman; font-size: 12px; font-weight: bold;
>>> width:90px; height:25px; padding-bottom: 0; " >
>>> </FORM>
>>> The page "users_guide.php" is quite plain - no interaction with user or
>>> anything else. It does not use any session variables. It opens quite ok.
>>> To close it I use the cross in the upper right corner (Windows).
>>> But ... When I come back to "index.php", I get
>>> isset($_SESSION['run_id'])=FALSE
>>> and thereby a new run id!
>>> I have a number of "fake buttons" like this on that page and they all
>>> have the same effect on the run id. In one of them the addressed page
>>> actually uses the run id. That works ok, so I know it was not destroyed
>>> before the button was pressed.
>>> By the way - if I use a simple link instead, the run id is persistent as
>>> it should be.
>>> Any idea of how I can get around this (without going back to simple
>>> links - they don't look nice)?
>>>
>>> / Erik
>>>
>>>
>> I doubt this is PHP or Apache. It sounds like your browser is clearing
>> cookies when you close the window.
>>
> Jerry, you are a genius!
> I installed and ran Netscape v.8 and there everything is ok - no red
> results in my test table!
> I also reinstalled Explorer, but that had no effect.
> Any idea of how to make Explorer behave?
>
> / Erik
>
>

(top posting fixed)

Toss it in the bit bucket? :-)

You might check an IE newsgroup. But I don't use it unless I am forced
to do so. So it might be a setting in it, but I wouldn't know what it
would be.

P.S. Please don't top post. Thanks.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex [at] attglobal.net
==================
Jerry Stuckle [ Fr, 26 Oktober 2007 05:29 ] [ ID #1855366 ]
PHP » alt.php » Session variables persistency

Vorheriges Thema: php redirect doesnt work
Nächstes Thema: Limits to XPath implementaiton in PHP5