Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #6248

Re: sessions causing refreshing not to work

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail
From Arno Welzel <usenet@arnowelzel.de>
Newsgroups comp.lang.php
Subject Re: sessions causing refreshing not to work
Date Tue, 05 Jun 2012 03:27:54 +0200
Organization A noiseless patient Spider
Lines 44
Message-ID <4FCD609A.30704@arnowelzel.de> (permalink)
References <At-dnY91kY5PSlfSnZ2dnUVZ_r6dnZ2d@earthlink.com> <slrnjslo4r.4ci.hellsop@nibelheim.ninehells.com> <4FCC4E21.8090502@arnowelzel.de> <slrnjspo1k.4ci.hellsop@nibelheim.ninehells.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 7bit
Injection-Info mx04.eternal-september.org; posting-host="tpi80xibcZOft+rICHc6oA"; logging-data="26027"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+fZKMLN8lDziM6gvwzcVDV5u/ik7SAknU="
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1
In-Reply-To <slrnjspo1k.4ci.hellsop@nibelheim.ninehells.com>
Cancel-Lock sha1:RYtBADDmVGWcUBazY3RICuk3xdA=
Xref csiph.com comp.lang.php:6248

Show key headers only | View raw


Peter H. Coffin, 04.06.2012 18:20:

> On Mon, 04 Jun 2012 07:56:49 +0200, Arno Welzel wrote:
>> Peter H. Coffin, 03.06.2012 05:57:
>>
>>> On Sat, 02 Jun 2012 23:17:03 -0400, Michael Joel wrote:
>>>> I have page data being sent through a php script that uses sessions to 
>>>> pass along variables. These vars are used to load data.
>>>>
>>>> If a user opens a page, everything works fine.
>>>> If they open another in a new window it works fine.
>>>> If they tab back over to the original browser window and hit refresh it 
>>>> switches to the last page they opened in the other window.
>>>>
>>>> This is because sessions is keeping that last var data in memory so the 
>>>> old page when refreshed reads the new var data and opens new data 
>>>> instead of refreshing the old.
>>>>
>>>> How would I go about fixing this so a page doesn't lose it's var data on 
>>>> refresh?
>>>
>>> Set session.use_trans_sid, unset session.use_cookie, don't forget to
>>> grab the session ID out of the $_GET array for every page load. Yes,
>>> your URLs will be ugly, and it'll be not impossible for someone to end
>>> up screwing things somehow with URL bookmarking or sharing.
>>
>> Don't do this.
>>
>> 1) It won't change anything. The session itself will remain the same -
>> therefore it makes no sense to transmit the ID via the URL.
> 
> It WILL, though, mean that users can have separate sessions in different
> tabs in the browser, which is the effect of the original problem that
> was requested help with.

Only, if the user manually removes the session ID in the URL *and*
Cookies are not used at all.



-- 
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

sessions causing refreshing not to work Michael Joel <null@void.void> - 2012-06-02 23:17 -0400
  Re: sessions causing refreshing not to work "Peter H. Coffin" <hellsop@ninehells.com> - 2012-06-02 22:57 -0500
    Re: sessions causing refreshing not to work Fred <fr-icsr@numericable.fr> - 2012-06-03 13:07 +0200
      Re: sessions causing refreshing not to work "Peter H. Coffin" <hellsop@ninehells.com> - 2012-06-03 22:20 -0500
    Re: sessions causing refreshing not to work Arno Welzel <usenet@arnowelzel.de> - 2012-06-04 07:56 +0200
      Re: sessions causing refreshing not to work "Peter H. Coffin" <hellsop@ninehells.com> - 2012-06-04 11:20 -0500
        Re: sessions causing refreshing not to work Arno Welzel <usenet@arnowelzel.de> - 2012-06-05 03:27 +0200
    Re: sessions causing refreshing not to work Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-06-05 06:46 +0200
      Re: sessions causing refreshing not to work "Peter H. Coffin" <hellsop@ninehells.com> - 2012-06-05 07:14 -0500
        Re: sessions causing refreshing not to work Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-06-05 20:52 +0200
          Re: sessions causing refreshing not to work "Peter H. Coffin" <hellsop@ninehells.com> - 2012-06-05 15:05 -0500
            Re: sessions causing refreshing not to work Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-06-06 21:50 +0200
        Re: sessions causing refreshing not to work Richard Damon <news.x.richarddamon@xoxy.net> - 2012-06-06 08:34 -0400
  Re: sessions causing refreshing not to work Fred <fr-icsr@numericable.fr> - 2012-06-03 13:21 +0200
    Re: sessions causing refreshing not to work Michael Joel <null@void.void> - 2012-06-03 09:59 -0400
      Re: sessions causing refreshing not to work Fred <fr-icsr@numericable.fr> - 2012-06-03 16:43 +0200
        Re: sessions causing refreshing not to work Denis McMahon <denismfmcmahon@gmail.com> - 2012-06-03 19:13 +0000
  Re: sessions causing refreshing not to work Arno Welzel <usenet@arnowelzel.de> - 2012-06-04 07:59 +0200
  Re: sessions causing refreshing not to work "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2012-06-04 09:12 +0200
  Re: sessions causing refreshing not to work Michael Joel <null@void.void> - 2012-06-05 16:51 -0400
    Re: sessions causing refreshing not to work The Natural Philosopher <tnp@invalid.invalid> - 2012-06-05 23:09 +0100

csiph-web