SESSIONS lost sometimes
am 19.08.2009 18:29:55 von angelo
Dear all,
We have a server with a site that does some XML calls. After lots of testing
I have found that the server is losing session variables.
However sometimes it isn't losing them so I don't think it's a code thing
rather a server issue. The strange thing is that its not consistent.
Things to note:
The session array is really big, quite a few variables.
Also the site goes from HTTP to HTTPS at some point but this isn't the issue
as it loses the sessions as soon as they are set sometimes.
Therefore I would like to know what I could check. I have read in other
posts that I should check:
-Disk space
-Garbage collection running too frequently and reducing session lifetime in
an ini_set and it might be possible that my live sessions are being
erronously treated as garbage.
-Is there any other settings that I can check or should the above be all I
should check
Please any advise, comments, help is appreciated.
Thanks in advance.
Angelo
http://www.elemental.co.za
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
mssql_bind Question
am 19.08.2009 18:58:38 von David Stoltz
Code in question:
mssql_bind($stmt,
'@managerName',$managerName,SQLVARCHAR,false,false,50);
For a normal varchar field, the length is obvious, in this case 50.
But for an ntext field, how do I use the mssql_bind statement?
Far as I know, these are the only available "types" to use:
SQLTEXT, SQLVARCHAR, SQLCHAR, SQLINT1, SQLINT2, SQLINT4, SQLBIT,
SQLFLT4, SQLFLT8, SQLFLTN
I need to use which type, and what length to use...?
Thanks for any advice...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: SESSIONS lost sometimes
am 19.08.2009 20:18:25 von Ben Dunlap
> We have a server with a site that does some XML calls. After lots of testing
> I have found that the server is losing session variables.
[8<]
> Also the site goes from HTTP to HTTPS at some point but this isn't the issue
> as it loses the sessions as soon as they are set sometimes.
>
> Therefore I would like to know what I could check. I have read in other
Can you clarify what you mean by "losing sessions"? Have you taken a
network trace to see whether the client is consistently sending the
session ID with every request?
When the problem happens, is $_SESSION completely empty or is it only
missing some variables? Does it seem to happen on any page, or only
certain ones?
Thanks,
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: SESSIONS lost sometimes
am 20.08.2009 08:53:07 von angelo
-----Original Message-----
From: Ben Dunlap [mailto:bdunlap@agentintellect.com]
Sent: 19 August 2009 08:18 PM
To: Angelo Zanetti
Cc: php-general@lists.php.net
Subject: Re: [PHP] SESSIONS lost sometimes
> We have a server with a site that does some XML calls. After lots of
testing
> I have found that the server is losing session variables.
[8<]
> Also the site goes from HTTP to HTTPS at some point but this isn't the
issue
> as it loses the sessions as soon as they are set sometimes.
>
> Therefore I would like to know what I could check. I have read in other
Can you clarify what you mean by "losing sessions"? Have you taken a
network trace to see whether the client is consistently sending the
session ID with every request?
When the problem happens, is $_SESSION completely empty or is it only
missing some variables? Does it seem to happen on any page, or only
certain ones?
Thanks,
Ben
Hi Ben,
When the problem happens the $_SESSION is partially empty. It only has the
some of the variables set.
It happens on a certain page only, but the strange thing is that it never
happened before its only happening now. But the code hasn't changed so is it
safe to assume that it's a server issue?
Thanks
Angelo
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: SESSIONS lost sometimes
am 20.08.2009 09:44:02 von Leon du Plessis
Since we are on the subject: I have the following similar problem:
When testing page on internet explorer, I find that one tab's variables can
affect another tab's variables. Thus when having the same web-site open and
using SESSION variables but for different users, Internet explorer can
become "disorientated". This also "sometimes" happen when I have two
separate browsing windows open with Internet Explorer for the same site.
I have yet to determine if this is an internet explorer, or PHP or
combination of the two that is causing this condition.
To my understanding _SESSION variables should be maintained per session, tab
or window. If this has been addressed already, my apologies, but thought it
worthwhile to mention.
If someone perhaps have a solution or can confirm this as a known issue and
maybe is the same or related to Angelo's problem?
-----Original Message-----
From: Angelo Zanetti [mailto:angelo@zlogic.co.za]
Sent: 20 August 2009 08:53 AM
To: 'Ben Dunlap'
Cc: php-general@lists.php.net
Subject: RE: [PHP] SESSIONS lost sometimes
-----Original Message-----
From: Ben Dunlap [mailto:bdunlap@agentintellect.com]
Sent: 19 August 2009 08:18 PM
To: Angelo Zanetti
Cc: php-general@lists.php.net
Subject: Re: [PHP] SESSIONS lost sometimes
> We have a server with a site that does some XML calls. After lots of
testing
> I have found that the server is losing session variables.
[8<]
> Also the site goes from HTTP to HTTPS at some point but this isn't the
issue
> as it loses the sessions as soon as they are set sometimes.
>
> Therefore I would like to know what I could check. I have read in other
Can you clarify what you mean by "losing sessions"? Have you taken a
network trace to see whether the client is consistently sending the
session ID with every request?
When the problem happens, is $_SESSION completely empty or is it only
missing some variables? Does it seem to happen on any page, or only
certain ones?
Thanks,
Ben
Hi Ben,
When the problem happens the $_SESSION is partially empty. It only has the
some of the variables set.
It happens on a certain page only, but the strange thing is that it never
happened before its only happening now. But the code hasn't changed so is it
safe to assume that it's a server issue?
Thanks
Angelo
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: SESSIONS lost sometimes
am 20.08.2009 10:03:02 von Arno Kuhl
-----Original Message-----
From: Leon du Plessis [mailto:leon@dsgnit.com]
Sent: 20 August 2009 09:44 AM
To: php-general@lists.php.net
Subject: RE: [PHP] SESSIONS lost sometimes
Since we are on the subject: I have the following similar problem:
When testing page on internet explorer, I find that one tab's variables can
affect another tab's variables. Thus when having the same web-site open and
using SESSION variables but for different users, Internet explorer can
become "disorientated". This also "sometimes" happen when I have two
separate browsing windows open with Internet Explorer for the same site.
I have yet to determine if this is an internet explorer, or PHP or
combination of the two that is causing this condition.
To my understanding _SESSION variables should be maintained per session, tab
or window. If this has been addressed already, my apologies, but thought it
worthwhile to mention.
If someone perhaps have a solution or can confirm this as a known issue and
maybe is the same or related to Angelo's problem?
--------------------
If different browser windows/tabs on the same client-side computer didn't
share session info then you'd get the effect of being able to log onto a
site with one browser window, but find in a second browser window that you
were not yet logged on. Experience will tell you that you're logged on in
both browser windows (try it with your online bank). It's not an issue, it's
a feature. If you want to be able to use different browser windows as though
they were different users then use different browsers e.g. IE and FF on the
same client-side computer will look like two separate end users to the
server, and they don't share session info or cookies.
Cheers
Arno
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: SESSIONS lost sometimes
am 20.08.2009 10:26:35 von Leon du Plessis
">> It's not an issue, it's a feature."
Thanks Arno...but it is a pain also.
If I work with user A in Tab1 (window1), I want to work with user B
separately in Tab2. When user in Tab2 logs off, I still want user A to work,
and not suddenly have to re-login. Same with bank. If I work with my company
account, then my personal account must not become an issue because I am on
the same machine and site.
I have no issue with using FF and IE to do testing as that takes care of
browser compatibility testing at the same time :-), but I think when you
start a new session with new values, it should be kept under that window/tab
alone. Cookies can take care of more details, but my opinion is data should
never be affected across windows/tabs unless the same user is logged in on
both....even then I would expect PHP to keep data per session. Maybe it goes
beyond being an IE or FF issue..the questiojn is...will PHP allow variables
from session A become corrupted when session B is in progress when they
should actually be handled seperately?
In the end I think it is something I do wrong in PHP with the SESSION
variables and how I clear them....if so...I don't think PHP should allow
clearing SESSION variables from other sessions.
-----Original Message-----
From: Arno Kuhl [mailto:akuhl@telkomsa.net]
Sent: 20 August 2009 10:03 AM
To: 'Leon du Plessis'; php-general@lists.php.net
Subject: RE: [PHP] SESSIONS lost sometimes
-----Original Message-----
From: Leon du Plessis [mailto:leon@dsgnit.com]
Sent: 20 August 2009 09:44 AM
To: php-general@lists.php.net
Subject: RE: [PHP] SESSIONS lost sometimes
Since we are on the subject: I have the following similar problem:
When testing page on internet explorer, I find that one tab's variables can
affect another tab's variables. Thus when having the same web-site open and
using SESSION variables but for different users, Internet explorer can
become "disorientated". This also "sometimes" happen when I have two
separate browsing windows open with Internet Explorer for the same site.
I have yet to determine if this is an internet explorer, or PHP or
combination of the two that is causing this condition.
To my understanding _SESSION variables should be maintained per session, tab
or window. If this has been addressed already, my apologies, but thought it
worthwhile to mention.
If someone perhaps have a solution or can confirm this as a known issue and
maybe is the same or related to Angelo's problem?
--------------------
If different browser windows/tabs on the same client-side computer didn't
share session info then you'd get the effect of being able to log onto a
site with one browser window, but find in a second browser window that you
were not yet logged on. Experience will tell you that you're logged on in
both browser windows (try it with your online bank). It's not an issue, it's
a feature. If you want to be able to use different browser windows as though
they were different users then use different browsers e.g. IE and FF on the
same client-side computer will look like two separate end users to the
server, and they don't share session info or cookies.
Cheers
Arno
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: SESSIONS lost sometimes
am 20.08.2009 10:39:36 von Nitebirdz
On Thu, Aug 20, 2009 at 09:44:02AM +0200, Leon du Plessis wrote:
>
> Since we are on the subject: I have the following similar problem:
>
> When testing page on internet explorer, I find that one tab's variables can
> affect another tab's variables. Thus when having the same web-site open and
> using SESSION variables but for different users, Internet explorer can
> become "disorientated". This also "sometimes" happen when I have two
> separate browsing windows open with Internet Explorer for the same site.
>
> I have yet to determine if this is an internet explorer, or PHP or
> combination of the two that is causing this condition.
>
> To my understanding _SESSION variables should be maintained per session, tab
> or window. If this has been addressed already, my apologies, but thought it
> worthwhile to mention.
>
I'm a total newbie when it comes to these issues, but it seems to me
that Firefox behaves in the very same manner. It's not limited to PHP
sessions either. It's always been my experience on any website that
requires authentication, including the likes of Google Mail, etc. When
I want to run multiple sessions for different GMail accounts, for
example, I just create a different user profile in Firefox.
It'd make sense for things to run this way, I think. After all, I'd
find it quite confusing if I log into Google Docs, open a document (by
default, it opens in a new tab) and I had to log in yet again to be able
to edit it.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: SESSIONS lost sometimes
am 20.08.2009 10:47:24 von Peter Ford
Leon du Plessis wrote:
> ">> It's not an issue, it's a feature."
>
> Thanks Arno...but it is a pain also.
> If I work with user A in Tab1 (window1), I want to work with user B
> separately in Tab2. When user in Tab2 logs off, I still want user A to work,
> and not suddenly have to re-login. Same with bank. If I work with my company
> account, then my personal account must not become an issue because I am on
> the same machine and site.
>
> I have no issue with using FF and IE to do testing as that takes care of
> browser compatibility testing at the same time :-), but I think when you
> start a new session with new values, it should be kept under that window/tab
> alone. Cookies can take care of more details, but my opinion is data should
> never be affected across windows/tabs unless the same user is logged in on
> both....even then I would expect PHP to keep data per session. Maybe it goes
> beyond being an IE or FF issue..the questiojn is...will PHP allow variables
> from session A become corrupted when session B is in progress when they
> should actually be handled seperately?
>
> In the end I think it is something I do wrong in PHP with the SESSION
> variables and how I clear them....if so...I don't think PHP should allow
> clearing SESSION variables from other sessions.
>
> -----Original Message-----
> From: Arno Kuhl [mailto:akuhl@telkomsa.net]
> Sent: 20 August 2009 10:03 AM
> To: 'Leon du Plessis'; php-general@lists.php.net
> Subject: RE: [PHP] SESSIONS lost sometimes
>
> -----Original Message-----
> From: Leon du Plessis [mailto:leon@dsgnit.com]
> Sent: 20 August 2009 09:44 AM
> To: php-general@lists.php.net
> Subject: RE: [PHP] SESSIONS lost sometimes
>
> Since we are on the subject: I have the following similar problem:
>
> When testing page on internet explorer, I find that one tab's variables can
> affect another tab's variables. Thus when having the same web-site open and
> using SESSION variables but for different users, Internet explorer can
> become "disorientated". This also "sometimes" happen when I have two
> separate browsing windows open with Internet Explorer for the same site.
>
> I have yet to determine if this is an internet explorer, or PHP or
> combination of the two that is causing this condition.
>
> To my understanding _SESSION variables should be maintained per session, tab
> or window. If this has been addressed already, my apologies, but thought it
> worthwhile to mention.
>
> If someone perhaps have a solution or can confirm this as a known issue and
> maybe is the same or related to Angelo's problem?
>
> --------------------
>
> If different browser windows/tabs on the same client-side computer didn't
> share session info then you'd get the effect of being able to log onto a
> site with one browser window, but find in a second browser window that you
> were not yet logged on. Experience will tell you that you're logged on in
> both browser windows (try it with your online bank). It's not an issue, it's
> a feature. If you want to be able to use different browser windows as though
> they were different users then use different browsers e.g. IE and FF on the
> same client-side computer will look like two separate end users to the
> server, and they don't share session info or cookies.
>
> Cheers
> Arno
>
>
The key thing is that both tabs (or windows) from the same browser are in the
*same* session - they send the *same* PHPID cookie. PHP is essentially stateless
- it doesn't care where the request comes from, and ties a session to the PHPID
cookie if it gets one. As far as PHP knows, requests from different tabs with
the same PHPID cookie are requests from the same place in the same session.
To get a different session you need a different instance of the browser - that's
the way browsers have been coded to work. It's not too hard with Firefox, since
you can set up multiple profiles to have independent Firefox windows on the same
screen.
--
Peter Ford phone: 01580 893333
Developer fax: 01580 893399
Justcroft International Ltd., Staplehurst, Kent
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: SESSIONS lost sometimes
am 20.08.2009 10:47:46 von Nitebirdz
On Thu, Aug 20, 2009 at 10:26:35AM +0200, Leon du Plessis wrote:
> ">> It's not an issue, it's a feature."
>
> Thanks Arno...but it is a pain also.
> If I work with user A in Tab1 (window1), I want to work with user B
> separately in Tab2. When user in Tab2 logs off, I still want user A to work,
> and not suddenly have to re-login. Same with bank. If I work with my company
> account, then my personal account must not become an issue because I am on
> the same machine and site.
>
As mentioned in my other email, I've only been able to get this to work
by using different user profiles under Firefox. If you need to run them
both at the same time, the following document helps explaining how to
accomplish it:
http://lifehacker.com/software/firefox/geek-to-live--manage- multiple-firefox-profiles-231646.php
I never tested it because I don't run Windows, but a similar setup works
just fine for Linux.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: SESSIONS lost sometimes
am 20.08.2009 10:50:26 von Leon du Plessis
">> It'd make sense for things to run this way, I think. After all, I'd
find it quite confusing if I log into Google Docs, open a document (by
default, it opens in a new tab) and I had to log in yet again to be able to
edit it."
Yes. I agree. But in this case the Tab being opened is used with the same
authentication details either via POST, GET or Cookie variables. The problem
comes in when a totally different set of login credentials are being used
(for the same tab/window). Other user's login particulars should not affect
your login variables.
-----Original Message-----
From: Nitebirdz [mailto:nitebirdz@sacredchaos.com]
Sent: 20 August 2009 10:40 AM
To: php-general@lists.php.net
Subject: Re: [PHP] SESSIONS lost sometimes
On Thu, Aug 20, 2009 at 09:44:02AM +0200, Leon du Plessis wrote:
>
> Since we are on the subject: I have the following similar problem:
>
> When testing page on internet explorer, I find that one tab's variables
can
> affect another tab's variables. Thus when having the same web-site open
and
> using SESSION variables but for different users, Internet explorer can
> become "disorientated". This also "sometimes" happen when I have two
> separate browsing windows open with Internet Explorer for the same site.
>
> I have yet to determine if this is an internet explorer, or PHP or
> combination of the two that is causing this condition.
>
> To my understanding _SESSION variables should be maintained per session,
tab
> or window. If this has been addressed already, my apologies, but thought
it
> worthwhile to mention.
>
I'm a total newbie when it comes to these issues, but it seems to me
that Firefox behaves in the very same manner. It's not limited to PHP
sessions either. It's always been my experience on any website that
requires authentication, including the likes of Google Mail, etc. When
I want to run multiple sessions for different GMail accounts, for
example, I just create a different user profile in Firefox.
It'd make sense for things to run this way, I think. After all, I'd
find it quite confusing if I log into Google Docs, open a document (by
default, it opens in a new tab) and I had to log in yet again to be able
to edit it.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: SESSIONS lost sometimes
am 20.08.2009 10:57:24 von Leon du Plessis
That is how I know browsers to work, yet for a while the bahaviour has
changed. The question in light of this then is, should a new browser or tab
not open a new PHP SESSION ID. Session ID's should be kept if called from
existing pages or ID's? But new pages has no parent? Just wondering.
-----Original Message-----
From: Peter Ford [mailto:pete@justcroft.com]
Sent: 20 August 2009 10:47 AM
To: php-general@lists.php.net
Subject: Re: [PHP] SESSIONS lost sometimes
Leon du Plessis wrote:
> ">> It's not an issue, it's a feature."
>
> Thanks Arno...but it is a pain also.
> If I work with user A in Tab1 (window1), I want to work with user B
> separately in Tab2. When user in Tab2 logs off, I still want user A to
work,
> and not suddenly have to re-login. Same with bank. If I work with my
company
> account, then my personal account must not become an issue because I am on
> the same machine and site.
>
> I have no issue with using FF and IE to do testing as that takes care of
> browser compatibility testing at the same time :-), but I think when you
> start a new session with new values, it should be kept under that
window/tab
> alone. Cookies can take care of more details, but my opinion is data
should
> never be affected across windows/tabs unless the same user is logged in on
> both....even then I would expect PHP to keep data per session. Maybe it
goes
> beyond being an IE or FF issue..the questiojn is...will PHP allow
variables
> from session A become corrupted when session B is in progress when they
> should actually be handled seperately?
>
> In the end I think it is something I do wrong in PHP with the SESSION
> variables and how I clear them....if so...I don't think PHP should allow
> clearing SESSION variables from other sessions.
>
> -----Original Message-----
> From: Arno Kuhl [mailto:akuhl@telkomsa.net]
> Sent: 20 August 2009 10:03 AM
> To: 'Leon du Plessis'; php-general@lists.php.net
> Subject: RE: [PHP] SESSIONS lost sometimes
>
> -----Original Message-----
> From: Leon du Plessis [mailto:leon@dsgnit.com]
> Sent: 20 August 2009 09:44 AM
> To: php-general@lists.php.net
> Subject: RE: [PHP] SESSIONS lost sometimes
>
> Since we are on the subject: I have the following similar problem:
>
> When testing page on internet explorer, I find that one tab's variables
can
> affect another tab's variables. Thus when having the same web-site open
and
> using SESSION variables but for different users, Internet explorer can
> become "disorientated". This also "sometimes" happen when I have two
> separate browsing windows open with Internet Explorer for the same site.
>
> I have yet to determine if this is an internet explorer, or PHP or
> combination of the two that is causing this condition.
>
> To my understanding _SESSION variables should be maintained per session,
tab
> or window. If this has been addressed already, my apologies, but thought
it
> worthwhile to mention.
>
> If someone perhaps have a solution or can confirm this as a known issue
and
> maybe is the same or related to Angelo's problem?
>
> --------------------
>
> If different browser windows/tabs on the same client-side computer didn't
> share session info then you'd get the effect of being able to log onto a
> site with one browser window, but find in a second browser window that you
> were not yet logged on. Experience will tell you that you're logged on in
> both browser windows (try it with your online bank). It's not an issue,
it's
> a feature. If you want to be able to use different browser windows as
though
> they were different users then use different browsers e.g. IE and FF on
the
> same client-side computer will look like two separate end users to the
> server, and they don't share session info or cookies.
>
> Cheers
> Arno
>
>
The key thing is that both tabs (or windows) from the same browser are in
the
*same* session - they send the *same* PHPID cookie. PHP is essentially
stateless
- it doesn't care where the request comes from, and ties a session to the
PHPID
cookie if it gets one. As far as PHP knows, requests from different tabs
with
the same PHPID cookie are requests from the same place in the same session.
To get a different session you need a different instance of the browser -
that's
the way browsers have been coded to work. It's not too hard with Firefox,
since
you can set up multiple profiles to have independent Firefox windows on the
same
screen.
--
Peter Ford phone: 01580 893333
Developer fax: 01580 893399
Justcroft International Ltd., Staplehurst, Kent
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: SESSIONS lost sometimes
am 20.08.2009 11:30:18 von Leon du Plessis
Hi,
Just a re-iteration on the problem:
Browser 1 has user A details
Browser 2 has user B details
User B logs off, then user A is suddenly in logged of status also.
The method used to destroy the session is:
// Unset all of the session variables.
$_SESSION = array();
// Finally, destroy the session.
session_destroy();
Problem. User's A session is also destroyed. The concern is, that this
should not be the case. User A must happily continue to work.
So, should PHP destroy the whole browser's session id's variables? My answer
is "No".
User A and user B should have different session ids, if not, then it is
wrong. A new window should have PHP to spawn a new session id (that is, the
request does not come from an existing page where an id has been created
already. If the ids are different, then session_destroy should only clear
variables for relevant session_id, ie only User B's details In this example.
The problem then probably lies in the session_ids being either the same for
the two different logins (although they are on different browser) or
session_destroy clearing data across sessions. (I will test that later). It
would then seem that session ids is setup per location/machine by MS Windows
as per Peter's explanation. Setting up profiles is the the resolution as
suggested. Otherwise, it would be nice if Windows/IE/FF/PHP could identify
when a BRAND NEW page is being opened and then create a brand new session id
for that window/tab.
It is not a huge issue, I was just wondering if someone else had the same
annoying condition. I am happy with the responses and the functionality
somewhere on a wish-list.
Now Back to Angelo's SESSION problem which sounded like it could be related.
Greetings!
Leon
-----Original Message-----
From: Leon du Plessis [mailto:leon@dsgnit.com]
Sent: 20 August 2009 10:57 AM
To: 'Peter Ford'; php-general@lists.php.net
Subject: RE: [PHP] SESSIONS lost sometimes
That is how I know browsers to work, yet for a while the bahaviour has
changed. The question in light of this then is, should a new browser or tab
not open a new PHP SESSION ID. Session ID's should be kept if called from
existing pages or ID's? But new pages has no parent? Just wondering.
-----Original Message-----
From: Peter Ford [mailto:pete@justcroft.com]
Sent: 20 August 2009 10:47 AM
To: php-general@lists.php.net
Subject: Re: [PHP] SESSIONS lost sometimes
Leon du Plessis wrote:
> ">> It's not an issue, it's a feature."
>
> Thanks Arno...but it is a pain also.
> If I work with user A in Tab1 (window1), I want to work with user B
> separately in Tab2. When user in Tab2 logs off, I still want user A to
work,
> and not suddenly have to re-login. Same with bank. If I work with my
company
> account, then my personal account must not become an issue because I am on
> the same machine and site.
>
> I have no issue with using FF and IE to do testing as that takes care of
> browser compatibility testing at the same time :-), but I think when you
> start a new session with new values, it should be kept under that
window/tab
> alone. Cookies can take care of more details, but my opinion is data
should
> never be affected across windows/tabs unless the same user is logged in on
> both....even then I would expect PHP to keep data per session. Maybe it
goes
> beyond being an IE or FF issue..the questiojn is...will PHP allow
variables
> from session A become corrupted when session B is in progress when they
> should actually be handled seperately?
>
> In the end I think it is something I do wrong in PHP with the SESSION
> variables and how I clear them....if so...I don't think PHP should allow
> clearing SESSION variables from other sessions.
>
> -----Original Message-----
> From: Arno Kuhl [mailto:akuhl@telkomsa.net]
> Sent: 20 August 2009 10:03 AM
> To: 'Leon du Plessis'; php-general@lists.php.net
> Subject: RE: [PHP] SESSIONS lost sometimes
>
> -----Original Message-----
> From: Leon du Plessis [mailto:leon@dsgnit.com]
> Sent: 20 August 2009 09:44 AM
> To: php-general@lists.php.net
> Subject: RE: [PHP] SESSIONS lost sometimes
>
> Since we are on the subject: I have the following similar problem:
>
> When testing page on internet explorer, I find that one tab's variables
can
> affect another tab's variables. Thus when having the same web-site open
and
> using SESSION variables but for different users, Internet explorer can
> become "disorientated". This also "sometimes" happen when I have two
> separate browsing windows open with Internet Explorer for the same site.
>
> I have yet to determine if this is an internet explorer, or PHP or
> combination of the two that is causing this condition.
>
> To my understanding _SESSION variables should be maintained per session,
tab
> or window. If this has been addressed already, my apologies, but thought
it
> worthwhile to mention.
>
> If someone perhaps have a solution or can confirm this as a known issue
and
> maybe is the same or related to Angelo's problem?
>
> --------------------
>
> If different browser windows/tabs on the same client-side computer didn't
> share session info then you'd get the effect of being able to log onto a
> site with one browser window, but find in a second browser window that you
> were not yet logged on. Experience will tell you that you're logged on in
> both browser windows (try it with your online bank). It's not an issue,
it's
> a feature. If you want to be able to use different browser windows as
though
> they were different users then use different browsers e.g. IE and FF on
the
> same client-side computer will look like two separate end users to the
> server, and they don't share session info or cookies.
>
> Cheers
> Arno
>
>
The key thing is that both tabs (or windows) from the same browser are in
the
*same* session - they send the *same* PHPID cookie. PHP is essentially
stateless
- it doesn't care where the request comes from, and ties a session to the
PHPID
cookie if it gets one. As far as PHP knows, requests from different tabs
with
the same PHPID cookie are requests from the same place in the same session.
To get a different session you need a different instance of the browser -
that's
the way browsers have been coded to work. It's not too hard with Firefox,
since
you can set up multiple profiles to have independent Firefox windows on the
same
screen.
--
Peter Ford phone: 01580 893333
Developer fax: 01580 893399
Justcroft International Ltd., Staplehurst, Kent
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: SESSIONS lost sometimes
am 20.08.2009 11:39:24 von Ashley Sheridan
On Thu, 2009-08-20 at 10:50 +0200, Leon du Plessis wrote:
> ">> It'd make sense for things to run this way, I think. After all, I'd
> find it quite confusing if I log into Google Docs, open a document (by
> default, it opens in a new tab) and I had to log in yet again to be able to
> edit it."
>
> Yes. I agree. But in this case the Tab being opened is used with the same
> authentication details either via POST, GET or Cookie variables. The problem
> comes in when a totally different set of login credentials are being used
> (for the same tab/window). Other user's login particulars should not affect
> your login variables.
>
> -----Original Message-----
> From: Nitebirdz [mailto:nitebirdz@sacredchaos.com]
> Sent: 20 August 2009 10:40 AM
> To: php-general@lists.php.net
> Subject: Re: [PHP] SESSIONS lost sometimes
>
> On Thu, Aug 20, 2009 at 09:44:02AM +0200, Leon du Plessis wrote:
> >
> > Since we are on the subject: I have the following similar problem:
> >
> > When testing page on internet explorer, I find that one tab's variables
> can
> > affect another tab's variables. Thus when having the same web-site open
> and
> > using SESSION variables but for different users, Internet explorer can
> > become "disorientated". This also "sometimes" happen when I have two
> > separate browsing windows open with Internet Explorer for the same site.
> >
> > I have yet to determine if this is an internet explorer, or PHP or
> > combination of the two that is causing this condition.
> >
> > To my understanding _SESSION variables should be maintained per session,
> tab
> > or window. If this has been addressed already, my apologies, but thought
> it
> > worthwhile to mention.
> >
>
> I'm a total newbie when it comes to these issues, but it seems to me
> that Firefox behaves in the very same manner. It's not limited to PHP
> sessions either. It's always been my experience on any website that
> requires authentication, including the likes of Google Mail, etc. When
> I want to run multiple sessions for different GMail accounts, for
> example, I just create a different user profile in Firefox.
>
> It'd make sense for things to run this way, I think. After all, I'd
> find it quite confusing if I log into Google Docs, open a document (by
> default, it opens in a new tab) and I had to log in yet again to be able
> to edit it.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
The point is you are misunderstanding how browsers work. What the server
app is seeing is a new login that replaces the first. This is the way
browsers work, and if it changed to the idea you have for it, then
millions of sites would suddenly fail to work; i.e. any site that
requires a new tab or window to be opened in order to function, like
banks, etc.
Thanks,
Ash
http://www.ashleysheridan.co.uk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: SESSIONS lost sometimes
am 20.08.2009 12:04:08 von Leon du Plessis
Thanks Ashley,
I just want to iterate again that when a new page is opened by another
existing page in a new browser or Tab, the session_id is already created and
therefore the current way browsers work is in no way compremised. The new
browser/tab would receive the session id along with GET or POST variables.
What I am suggesting/hoping is that when a new browser is opened or a new
tab is opened via the application, the protocols would reckognize that this
is the first time the page is served and is not being called from another
page. That is, a new page is loaded by the user entering it, and NOT by
clicking login or some other link from an existing page.
Yes, I know..that creates other scenarios, so is happy to not meddle with
the way browsers work. It is just a limitation I will live with and can get
by with it.
Regards
Leon
-----Original Message-----
From: Ashley Sheridan [mailto:ash@ashleysheridan.co.uk]
Sent: 20 August 2009 11:39 AM
To: Leon du Plessis
Cc: 'Nitebirdz'; php-general@lists.php.net
Subject: RE: [PHP] SESSIONS lost sometimes
On Thu, 2009-08-20 at 10:50 +0200, Leon du Plessis wrote:
> ">> It'd make sense for things to run this way, I think. After all, I'd
> find it quite confusing if I log into Google Docs, open a document (by
> default, it opens in a new tab) and I had to log in yet again to be able
to
> edit it."
>
> Yes. I agree. But in this case the Tab being opened is used with the same
> authentication details either via POST, GET or Cookie variables. The
problem
> comes in when a totally different set of login credentials are being used
> (for the same tab/window). Other user's login particulars should not
affect
> your login variables.
>
> -----Original Message-----
> From: Nitebirdz [mailto:nitebirdz@sacredchaos.com]
> Sent: 20 August 2009 10:40 AM
> To: php-general@lists.php.net
> Subject: Re: [PHP] SESSIONS lost sometimes
>
> On Thu, Aug 20, 2009 at 09:44:02AM +0200, Leon du Plessis wrote:
> >
> > Since we are on the subject: I have the following similar problem:
> >
> > When testing page on internet explorer, I find that one tab's variables
> can
> > affect another tab's variables. Thus when having the same web-site open
> and
> > using SESSION variables but for different users, Internet explorer can
> > become "disorientated". This also "sometimes" happen when I have two
> > separate browsing windows open with Internet Explorer for the same site.
> >
> > I have yet to determine if this is an internet explorer, or PHP or
> > combination of the two that is causing this condition.
> >
> > To my understanding _SESSION variables should be maintained per session,
> tab
> > or window. If this has been addressed already, my apologies, but thought
> it
> > worthwhile to mention.
> >
>
> I'm a total newbie when it comes to these issues, but it seems to me
> that Firefox behaves in the very same manner. It's not limited to PHP
> sessions either. It's always been my experience on any website that
> requires authentication, including the likes of Google Mail, etc. When
> I want to run multiple sessions for different GMail accounts, for
> example, I just create a different user profile in Firefox.
>
> It'd make sense for things to run this way, I think. After all, I'd
> find it quite confusing if I log into Google Docs, open a document (by
> default, it opens in a new tab) and I had to log in yet again to be able
> to edit it.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
The point is you are misunderstanding how browsers work. What the server
app is seeing is a new login that replaces the first. This is the way
browsers work, and if it changed to the idea you have for it, then
millions of sites would suddenly fail to work; i.e. any site that
requires a new tab or window to be opened in order to function, like
banks, etc.
Thanks,
Ash
http://www.ashleysheridan.co.uk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: SESSIONS lost sometimes
am 20.08.2009 12:04:44 von Ashley Sheridan
On Thu, 2009-08-20 at 12:04 +0200, Leon du Plessis wrote:
> Thanks Ashley,
>
> I just want to iterate again that when a new page is opened by another
> existing page in a new browser or Tab, the session_id is already created and
> therefore the current way browsers work is in no way compremised. The new
> browser/tab would receive the session id along with GET or POST variables.
>
> What I am suggesting/hoping is that when a new browser is opened or a new
> tab is opened via the application, the protocols would reckognize that this
> is the first time the page is served and is not being called from another
> page. That is, a new page is loaded by the user entering it, and NOT by
> clicking login or some other link from an existing page.
>
> Yes, I know..that creates other scenarios, so is happy to not meddle with
> the way browsers work. It is just a limitation I will live with and can get
> by with it.
>
> Regards
> Leon
>
> -----Original Message-----
> From: Ashley Sheridan [mailto:ash@ashleysheridan.co.uk]
> Sent: 20 August 2009 11:39 AM
> To: Leon du Plessis
> Cc: 'Nitebirdz'; php-general@lists.php.net
> Subject: RE: [PHP] SESSIONS lost sometimes
>
> On Thu, 2009-08-20 at 10:50 +0200, Leon du Plessis wrote:
> > ">> It'd make sense for things to run this way, I think. After all, I'd
> > find it quite confusing if I log into Google Docs, open a document (by
> > default, it opens in a new tab) and I had to log in yet again to be able
> to
> > edit it."
> >
> > Yes. I agree. But in this case the Tab being opened is used with the same
> > authentication details either via POST, GET or Cookie variables. The
> problem
> > comes in when a totally different set of login credentials are being used
> > (for the same tab/window). Other user's login particulars should not
> affect
> > your login variables.
> >
> > -----Original Message-----
> > From: Nitebirdz [mailto:nitebirdz@sacredchaos.com]
> > Sent: 20 August 2009 10:40 AM
> > To: php-general@lists.php.net
> > Subject: Re: [PHP] SESSIONS lost sometimes
> >
> > On Thu, Aug 20, 2009 at 09:44:02AM +0200, Leon du Plessis wrote:
> > >
> > > Since we are on the subject: I have the following similar problem:
> > >
> > > When testing page on internet explorer, I find that one tab's variables
> > can
> > > affect another tab's variables. Thus when having the same web-site open
> > and
> > > using SESSION variables but for different users, Internet explorer can
> > > become "disorientated". This also "sometimes" happen when I have two
> > > separate browsing windows open with Internet Explorer for the same site.
> > >
> > > I have yet to determine if this is an internet explorer, or PHP or
> > > combination of the two that is causing this condition.
> > >
> > > To my understanding _SESSION variables should be maintained per session,
> > tab
> > > or window. If this has been addressed already, my apologies, but thought
> > it
> > > worthwhile to mention.
> > >
> >
> > I'm a total newbie when it comes to these issues, but it seems to me
> > that Firefox behaves in the very same manner. It's not limited to PHP
> > sessions either. It's always been my experience on any website that
> > requires authentication, including the likes of Google Mail, etc. When
> > I want to run multiple sessions for different GMail accounts, for
> > example, I just create a different user profile in Firefox.
> >
> > It'd make sense for things to run this way, I think. After all, I'd
> > find it quite confusing if I log into Google Docs, open a document (by
> > default, it opens in a new tab) and I had to log in yet again to be able
> > to edit it.
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> The point is you are misunderstanding how browsers work. What the server
> app is seeing is a new login that replaces the first. This is the way
> browsers work, and if it changed to the idea you have for it, then
> millions of sites would suddenly fail to work; i.e. any site that
> requires a new tab or window to be opened in order to function, like
> banks, etc.
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
There is one way to get around it, and that is to use arrays within your
session variables. So for example, it might look something like this:
$_SESSION['your_app_name']['username']['some_value']
This way, if the username doesn't exist, you know there is no session
for them. It's ugly, but it will get around what you see as a
limitation.
Thanks,
Ash
http://www.ashleysheridan.co.uk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: SESSIONS lost sometimes
am 20.08.2009 12:23:01 von Leon du Plessis
Thanks Ashley. Will implement if the need arise again..
By limitation I actually meant "annoyance".
"Limitation" was the wrong word to use.
(I think all browsers has something great and something not so great)
:-)
Greetings
-----Original Message-----
From: Ashley Sheridan [mailto:ash@ashleysheridan.co.uk]
Sent: 20 August 2009 12:05 PM
To: Leon du Plessis
Cc: 'Nitebirdz'; php-general@lists.php.net
Subject: RE: [PHP] SESSIONS lost sometimes
On Thu, 2009-08-20 at 12:04 +0200, Leon du Plessis wrote:
> Thanks Ashley,
>
> I just want to iterate again that when a new page is opened by another
> existing page in a new browser or Tab, the session_id is already created
and
> therefore the current way browsers work is in no way compremised. The new
> browser/tab would receive the session id along with GET or POST variables.
>
> What I am suggesting/hoping is that when a new browser is opened or a new
> tab is opened via the application, the protocols would reckognize that
this
> is the first time the page is served and is not being called from another
> page. That is, a new page is loaded by the user entering it, and NOT by
> clicking login or some other link from an existing page.
>
> Yes, I know..that creates other scenarios, so is happy to not meddle with
> the way browsers work. It is just a limitation I will live with and can
get
> by with it.
>
> Regards
> Leon
>
> -----Original Message-----
> From: Ashley Sheridan [mailto:ash@ashleysheridan.co.uk]
> Sent: 20 August 2009 11:39 AM
> To: Leon du Plessis
> Cc: 'Nitebirdz'; php-general@lists.php.net
> Subject: RE: [PHP] SESSIONS lost sometimes
>
> On Thu, 2009-08-20 at 10:50 +0200, Leon du Plessis wrote:
> > ">> It'd make sense for things to run this way, I think. After all, I'd
> > find it quite confusing if I log into Google Docs, open a document (by
> > default, it opens in a new tab) and I had to log in yet again to be able
> to
> > edit it."
> >
> > Yes. I agree. But in this case the Tab being opened is used with the
same
> > authentication details either via POST, GET or Cookie variables. The
> problem
> > comes in when a totally different set of login credentials are being
used
> > (for the same tab/window). Other user's login particulars should not
> affect
> > your login variables.
> >
> > -----Original Message-----
> > From: Nitebirdz [mailto:nitebirdz@sacredchaos.com]
> > Sent: 20 August 2009 10:40 AM
> > To: php-general@lists.php.net
> > Subject: Re: [PHP] SESSIONS lost sometimes
> >
> > On Thu, Aug 20, 2009 at 09:44:02AM +0200, Leon du Plessis wrote:
> > >
> > > Since we are on the subject: I have the following similar problem:
> > >
> > > When testing page on internet explorer, I find that one tab's
variables
> > can
> > > affect another tab's variables. Thus when having the same web-site
open
> > and
> > > using SESSION variables but for different users, Internet explorer can
> > > become "disorientated". This also "sometimes" happen when I have two
> > > separate browsing windows open with Internet Explorer for the same
site.
> > >
> > > I have yet to determine if this is an internet explorer, or PHP or
> > > combination of the two that is causing this condition.
> > >
> > > To my understanding _SESSION variables should be maintained per
session,
> > tab
> > > or window. If this has been addressed already, my apologies, but
thought
> > it
> > > worthwhile to mention.
> > >
> >
> > I'm a total newbie when it comes to these issues, but it seems to me
> > that Firefox behaves in the very same manner. It's not limited to PHP
> > sessions either. It's always been my experience on any website that
> > requires authentication, including the likes of Google Mail, etc. When
> > I want to run multiple sessions for different GMail accounts, for
> > example, I just create a different user profile in Firefox.
> >
> > It'd make sense for things to run this way, I think. After all, I'd
> > find it quite confusing if I log into Google Docs, open a document (by
> > default, it opens in a new tab) and I had to log in yet again to be able
> > to edit it.
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> The point is you are misunderstanding how browsers work. What the server
> app is seeing is a new login that replaces the first. This is the way
> browsers work, and if it changed to the idea you have for it, then
> millions of sites would suddenly fail to work; i.e. any site that
> requires a new tab or window to be opened in order to function, like
> banks, etc.
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
There is one way to get around it, and that is to use arrays within your
session variables. So for example, it might look something like this:
$_SESSION['your_app_name']['username']['some_value']
This way, if the username doesn't exist, you know there is no session
for them. It's ugly, but it will get around what you see as a
limitation.
Thanks,
Ash
http://www.ashleysheridan.co.uk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: SESSIONS lost sometimes
am 20.08.2009 13:20:52 von Nitebirdz
On Thu, Aug 20, 2009 at 12:04:08PM +0200, Leon du Plessis wrote:
> Thanks Ashley,
>
> I just want to iterate again that when a new page is opened by another
> existing page in a new browser or Tab, the session_id is already created and
> therefore the current way browsers work is in no way compremised. The new
> browser/tab would receive the session id along with GET or POST variables.
>
> What I am suggesting/hoping is that when a new browser is opened or a new
> tab is opened via the application, the protocols would reckognize that this
> is the first time the page is served and is not being called from another
> page. That is, a new page is loaded by the user entering it, and NOT by
> clicking login or some other link from an existing page.
>
Out of curiosity. Did you test it under Google Chrome? I believe each
tab is a separate process in the case of that browser. I wonder how
that might affect something like this.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: SESSIONS lost sometimes
am 20.08.2009 13:21:24 von angelo
Hi Leon and all.
LEON you are misunderstanding how the sessions work. Also please start your
own thread and don't hijack mine.
To the rest that replied. Thanks, I am still stuck with the problem I have
asked the hosting company to check the storage capacity and also any other
issues with the SESSIONS on the server.
However if anyone has other things they think I can look at, I'd appreciate
that very much.
Thanks
Angelo
http://www.elemental.co.za
-----Original Message-----
From: Leon du Plessis [mailto:leon@dsgnit.com]
Sent: 20 August 2009 12:04 PM
To: ash@ashleysheridan.co.uk
Cc: 'Nitebirdz'; php-general@lists.php.net
Subject: RE: [PHP] SESSIONS lost sometimes
Thanks Ashley,
I just want to iterate again that when a new page is opened by another
existing page in a new browser or Tab, the session_id is already created and
therefore the current way browsers work is in no way compremised. The new
browser/tab would receive the session id along with GET or POST variables.
What I am suggesting/hoping is that when a new browser is opened or a new
tab is opened via the application, the protocols would reckognize that this
is the first time the page is served and is not being called from another
page. That is, a new page is loaded by the user entering it, and NOT by
clicking login or some other link from an existing page.
Yes, I know..that creates other scenarios, so is happy to not meddle with
the way browsers work. It is just a limitation I will live with and can get
by with it.
Regards
Leon
-----Original Message-----
From: Ashley Sheridan [mailto:ash@ashleysheridan.co.uk]
Sent: 20 August 2009 11:39 AM
To: Leon du Plessis
Cc: 'Nitebirdz'; php-general@lists.php.net
Subject: RE: [PHP] SESSIONS lost sometimes
On Thu, 2009-08-20 at 10:50 +0200, Leon du Plessis wrote:
> ">> It'd make sense for things to run this way, I think. After all, I'd
> find it quite confusing if I log into Google Docs, open a document (by
> default, it opens in a new tab) and I had to log in yet again to be able
to
> edit it."
>
> Yes. I agree. But in this case the Tab being opened is used with the same
> authentication details either via POST, GET or Cookie variables. The
problem
> comes in when a totally different set of login credentials are being used
> (for the same tab/window). Other user's login particulars should not
affect
> your login variables.
>
> -----Original Message-----
> From: Nitebirdz [mailto:nitebirdz@sacredchaos.com]
> Sent: 20 August 2009 10:40 AM
> To: php-general@lists.php.net
> Subject: Re: [PHP] SESSIONS lost sometimes
>
> On Thu, Aug 20, 2009 at 09:44:02AM +0200, Leon du Plessis wrote:
> >
> > Since we are on the subject: I have the following similar problem:
> >
> > When testing page on internet explorer, I find that one tab's variables
> can
> > affect another tab's variables. Thus when having the same web-site open
> and
> > using SESSION variables but for different users, Internet explorer can
> > become "disorientated". This also "sometimes" happen when I have two
> > separate browsing windows open with Internet Explorer for the same site.
> >
> > I have yet to determine if this is an internet explorer, or PHP or
> > combination of the two that is causing this condition.
> >
> > To my understanding _SESSION variables should be maintained per session,
> tab
> > or window. If this has been addressed already, my apologies, but thought
> it
> > worthwhile to mention.
> >
>
> I'm a total newbie when it comes to these issues, but it seems to me
> that Firefox behaves in the very same manner. It's not limited to PHP
> sessions either. It's always been my experience on any website that
> requires authentication, including the likes of Google Mail, etc. When
> I want to run multiple sessions for different GMail accounts, for
> example, I just create a different user profile in Firefox.
>
> It'd make sense for things to run this way, I think. After all, I'd
> find it quite confusing if I log into Google Docs, open a document (by
> default, it opens in a new tab) and I had to log in yet again to be able
> to edit it.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
The point is you are misunderstanding how browsers work. What the server
app is seeing is a new login that replaces the first. This is the way
browsers work, and if it changed to the idea you have for it, then
millions of sites would suddenly fail to work; i.e. any site that
requires a new tab or window to be opened in order to function, like
banks, etc.
Thanks,
Ash
http://www.ashleysheridan.co.uk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: SESSIONS lost sometimes
am 20.08.2009 13:45:31 von Leon du Plessis
Hi Angelo,
No need to be nasty and touchy. If you have done trouble to read I have
closed the discussion in a prior listing and referred back to your original
thread. thanks
-----Original Message-----
From: Angelo Zanetti [mailto:angelo@zlogic.co.za]
Sent: 20 August 2009 01:21 PM
To: 'Leon du Plessis'; ash@ashleysheridan.co.uk
Cc: 'Nitebirdz'; php-general@lists.php.net
Subject: RE: [PHP] SESSIONS lost sometimes
Hi Leon and all.
LEON you are misunderstanding how the sessions work. Also please start your
own thread and don't hijack mine.
To the rest that replied. Thanks, I am still stuck with the problem I have
asked the hosting company to check the storage capacity and also any other
issues with the SESSIONS on the server.
However if anyone has other things they think I can look at, I'd appreciate
that very much.
Thanks
Angelo
http://www.elemental.co.za
-----Original Message-----
From: Leon du Plessis [mailto:leon@dsgnit.com]
Sent: 20 August 2009 12:04 PM
To: ash@ashleysheridan.co.uk
Cc: 'Nitebirdz'; php-general@lists.php.net
Subject: RE: [PHP] SESSIONS lost sometimes
Thanks Ashley,
I just want to iterate again that when a new page is opened by another
existing page in a new browser or Tab, the session_id is already created and
therefore the current way browsers work is in no way compremised. The new
browser/tab would receive the session id along with GET or POST variables.
What I am suggesting/hoping is that when a new browser is opened or a new
tab is opened via the application, the protocols would reckognize that this
is the first time the page is served and is not being called from another
page. That is, a new page is loaded by the user entering it, and NOT by
clicking login or some other link from an existing page.
Yes, I know..that creates other scenarios, so is happy to not meddle with
the way browsers work. It is just a limitation I will live with and can get
by with it.
Regards
Leon
-----Original Message-----
From: Ashley Sheridan [mailto:ash@ashleysheridan.co.uk]
Sent: 20 August 2009 11:39 AM
To: Leon du Plessis
Cc: 'Nitebirdz'; php-general@lists.php.net
Subject: RE: [PHP] SESSIONS lost sometimes
On Thu, 2009-08-20 at 10:50 +0200, Leon du Plessis wrote:
> ">> It'd make sense for things to run this way, I think. After all, I'd
> find it quite confusing if I log into Google Docs, open a document (by
> default, it opens in a new tab) and I had to log in yet again to be able
to
> edit it."
>
> Yes. I agree. But in this case the Tab being opened is used with the same
> authentication details either via POST, GET or Cookie variables. The
problem
> comes in when a totally different set of login credentials are being used
> (for the same tab/window). Other user's login particulars should not
affect
> your login variables.
>
> -----Original Message-----
> From: Nitebirdz [mailto:nitebirdz@sacredchaos.com]
> Sent: 20 August 2009 10:40 AM
> To: php-general@lists.php.net
> Subject: Re: [PHP] SESSIONS lost sometimes
>
> On Thu, Aug 20, 2009 at 09:44:02AM +0200, Leon du Plessis wrote:
> >
> > Since we are on the subject: I have the following similar problem:
> >
> > When testing page on internet explorer, I find that one tab's variables
> can
> > affect another tab's variables. Thus when having the same web-site open
> and
> > using SESSION variables but for different users, Internet explorer can
> > become "disorientated". This also "sometimes" happen when I have two
> > separate browsing windows open with Internet Explorer for the same site.
> >
> > I have yet to determine if this is an internet explorer, or PHP or
> > combination of the two that is causing this condition.
> >
> > To my understanding _SESSION variables should be maintained per session,
> tab
> > or window. If this has been addressed already, my apologies, but thought
> it
> > worthwhile to mention.
> >
>
> I'm a total newbie when it comes to these issues, but it seems to me
> that Firefox behaves in the very same manner. It's not limited to PHP
> sessions either. It's always been my experience on any website that
> requires authentication, including the likes of Google Mail, etc. When
> I want to run multiple sessions for different GMail accounts, for
> example, I just create a different user profile in Firefox.
>
> It'd make sense for things to run this way, I think. After all, I'd
> find it quite confusing if I log into Google Docs, open a document (by
> default, it opens in a new tab) and I had to log in yet again to be able
> to edit it.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
The point is you are misunderstanding how browsers work. What the server
app is seeing is a new login that replaces the first. This is the way
browsers work, and if it changed to the idea you have for it, then
millions of sites would suddenly fail to work; i.e. any site that
requires a new tab or window to be opened in order to function, like
banks, etc.
Thanks,
Ash
http://www.ashleysheridan.co.uk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: SESSIONS lost sometimes
am 20.08.2009 14:25:12 von Floyd Resler
Leon,
Sessions are used on a per-domain basis. So, no matter how many
windows or tabs you have open for mydomain.com it will be the same
session for all. Having a different session start up for each window
or tab would be a major pain. If you needed to keep track of a user
ID, for example, you wouldn't be able to. As already mentioned you
can use different browsers. You can also set up sub-domains which
would each have their own sessions.
Take care,
Floyd
On Aug 20, 2009, at 4:26 AM, Leon du Plessis wrote:
> ">> It's not an issue, it's a feature."
>
> Thanks Arno...but it is a pain also.
> If I work with user A in Tab1 (window1), I want to work with user B
> separately in Tab2. When user in Tab2 logs off, I still want user A
> to work,
> and not suddenly have to re-login. Same with bank. If I work with my
> company
> account, then my personal account must not become an issue because I
> am on
> the same machine and site.
>
> I have no issue with using FF and IE to do testing as that takes
> care of
> browser compatibility testing at the same time :-), but I think when
> you
> start a new session with new values, it should be kept under that
> window/tab
> alone. Cookies can take care of more details, but my opinion is data
> should
> never be affected across windows/tabs unless the same user is logged
> in on
> both....even then I would expect PHP to keep data per session. Maybe
> it goes
> beyond being an IE or FF issue..the questiojn is...will PHP allow
> variables
> from session A become corrupted when session B is in progress when
> they
> should actually be handled seperately?
>
> In the end I think it is something I do wrong in PHP with the SESSION
> variables and how I clear them....if so...I don't think PHP should
> allow
> clearing SESSION variables from other sessions.
>
> -----Original Message-----
> From: Arno Kuhl [mailto:akuhl@telkomsa.net]
> Sent: 20 August 2009 10:03 AM
> To: 'Leon du Plessis'; php-general@lists.php.net
> Subject: RE: [PHP] SESSIONS lost sometimes
>
> -----Original Message-----
> From: Leon du Plessis [mailto:leon@dsgnit.com]
> Sent: 20 August 2009 09:44 AM
> To: php-general@lists.php.net
> Subject: RE: [PHP] SESSIONS lost sometimes
>
> Since we are on the subject: I have the following similar problem:
>
> When testing page on internet explorer, I find that one tab's
> variables can
> affect another tab's variables. Thus when having the same web-site
> open and
> using SESSION variables but for different users, Internet explorer can
> become "disorientated". This also "sometimes" happen when I have two
> separate browsing windows open with Internet Explorer for the same
> site.
>
> I have yet to determine if this is an internet explorer, or PHP or
> combination of the two that is causing this condition.
>
> To my understanding _SESSION variables should be maintained per
> session, tab
> or window. If this has been addressed already, my apologies, but
> thought it
> worthwhile to mention.
>
> If someone perhaps have a solution or can confirm this as a known
> issue and
> maybe is the same or related to Angelo's problem?
>
> --------------------
>
> If different browser windows/tabs on the same client-side computer
> didn't
> share session info then you'd get the effect of being able to log
> onto a
> site with one browser window, but find in a second browser window
> that you
> were not yet logged on. Experience will tell you that you're logged
> on in
> both browser windows (try it with your online bank). It's not an
> issue, it's
> a feature. If you want to be able to use different browser windows
> as though
> they were different users then use different browsers e.g. IE and FF
> on the
> same client-side computer will look like two separate end users to the
> server, and they don't share session info or cookies.
>
> Cheers
> Arno
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: SESSIONS lost sometimes
am 20.08.2009 14:34:41 von Leon du Plessis
No problem! Thx
-----Original Message-----
From: Angelo Zanetti [mailto:angelo@zlogic.co.za]
Sent: 20 August 2009 02:35 PM
To: 'Leon du Plessis'; php-general@lists.php.net
Subject: RE: [PHP] SESSIONS lost sometimes
Hi Leon,
No harm intended :) Just thought that people were missing my post now and
only answering yours.
Anyways hope your issue got resolved.
Angelo
-----Original Message-----
From: Leon du Plessis [mailto:leon@dsgnit.com]
Sent: 20 August 2009 01:46 PM
To: php-general@lists.php.net
Subject: RE: [PHP] SESSIONS lost sometimes
Hi Angelo,
No need to be nasty and touchy. If you have done trouble to read I have
closed the discussion in a prior listing and referred back to your original
thread. thanks
-----Original Message-----
From: Angelo Zanetti [mailto:angelo@zlogic.co.za]
Sent: 20 August 2009 01:21 PM
To: 'Leon du Plessis'; ash@ashleysheridan.co.uk
Cc: 'Nitebirdz'; php-general@lists.php.net
Subject: RE: [PHP] SESSIONS lost sometimes
Hi Leon and all.
LEON you are misunderstanding how the sessions work. Also please start your
own thread and don't hijack mine.
To the rest that replied. Thanks, I am still stuck with the problem I have
asked the hosting company to check the storage capacity and also any other
issues with the SESSIONS on the server.
However if anyone has other things they think I can look at, I'd appreciate
that very much.
Thanks
Angelo
http://www.elemental.co.za
-----Original Message-----
From: Leon du Plessis [mailto:leon@dsgnit.com]
Sent: 20 August 2009 12:04 PM
To: ash@ashleysheridan.co.uk
Cc: 'Nitebirdz'; php-general@lists.php.net
Subject: RE: [PHP] SESSIONS lost sometimes
Thanks Ashley,
I just want to iterate again that when a new page is opened by another
existing page in a new browser or Tab, the session_id is already created and
therefore the current way browsers work is in no way compremised. The new
browser/tab would receive the session id along with GET or POST variables.
What I am suggesting/hoping is that when a new browser is opened or a new
tab is opened via the application, the protocols would reckognize that this
is the first time the page is served and is not being called from another
page. That is, a new page is loaded by the user entering it, and NOT by
clicking login or some other link from an existing page.
Yes, I know..that creates other scenarios, so is happy to not meddle with
the way browsers work. It is just a limitation I will live with and can get
by with it.
Regards
Leon
-----Original Message-----
From: Ashley Sheridan [mailto:ash@ashleysheridan.co.uk]
Sent: 20 August 2009 11:39 AM
To: Leon du Plessis
Cc: 'Nitebirdz'; php-general@lists.php.net
Subject: RE: [PHP] SESSIONS lost sometimes
On Thu, 2009-08-20 at 10:50 +0200, Leon du Plessis wrote:
> ">> It'd make sense for things to run this way, I think. After all, I'd
> find it quite confusing if I log into Google Docs, open a document (by
> default, it opens in a new tab) and I had to log in yet again to be able
to
> edit it."
>
> Yes. I agree. But in this case the Tab being opened is used with the same
> authentication details either via POST, GET or Cookie variables. The
problem
> comes in when a totally different set of login credentials are being used
> (for the same tab/window). Other user's login particulars should not
affect
> your login variables.
>
> -----Original Message-----
> From: Nitebirdz [mailto:nitebirdz@sacredchaos.com]
> Sent: 20 August 2009 10:40 AM
> To: php-general@lists.php.net
> Subject: Re: [PHP] SESSIONS lost sometimes
>
> On Thu, Aug 20, 2009 at 09:44:02AM +0200, Leon du Plessis wrote:
> >
> > Since we are on the subject: I have the following similar problem:
> >
> > When testing page on internet explorer, I find that one tab's variables
> can
> > affect another tab's variables. Thus when having the same web-site open
> and
> > using SESSION variables but for different users, Internet explorer can
> > become "disorientated". This also "sometimes" happen when I have two
> > separate browsing windows open with Internet Explorer for the same site.
> >
> > I have yet to determine if this is an internet explorer, or PHP or
> > combination of the two that is causing this condition.
> >
> > To my understanding _SESSION variables should be maintained per session,
> tab
> > or window. If this has been addressed already, my apologies, but thought
> it
> > worthwhile to mention.
> >
>
> I'm a total newbie when it comes to these issues, but it seems to me
> that Firefox behaves in the very same manner. It's not limited to PHP
> sessions either. It's always been my experience on any website that
> requires authentication, including the likes of Google Mail, etc. When
> I want to run multiple sessions for different GMail accounts, for
> example, I just create a different user profile in Firefox.
>
> It'd make sense for things to run this way, I think. After all, I'd
> find it quite confusing if I log into Google Docs, open a document (by
> default, it opens in a new tab) and I had to log in yet again to be able
> to edit it.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
The point is you are misunderstanding how browsers work. What the server
app is seeing is a new login that replaces the first. This is the way
browsers work, and if it changed to the idea you have for it, then
millions of sites would suddenly fail to work; i.e. any site that
requires a new tab or window to be opened in order to function, like
banks, etc.
Thanks,
Ash
http://www.ashleysheridan.co.uk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: SESSIONS lost sometimes
am 20.08.2009 14:34:54 von angelo
Hi Leon,
No harm intended :) Just thought that people were missing my post now and
only answering yours.
Anyways hope your issue got resolved.
Angelo
-----Original Message-----
From: Leon du Plessis [mailto:leon@dsgnit.com]
Sent: 20 August 2009 01:46 PM
To: php-general@lists.php.net
Subject: RE: [PHP] SESSIONS lost sometimes
Hi Angelo,
No need to be nasty and touchy. If you have done trouble to read I have
closed the discussion in a prior listing and referred back to your original
thread. thanks
-----Original Message-----
From: Angelo Zanetti [mailto:angelo@zlogic.co.za]
Sent: 20 August 2009 01:21 PM
To: 'Leon du Plessis'; ash@ashleysheridan.co.uk
Cc: 'Nitebirdz'; php-general@lists.php.net
Subject: RE: [PHP] SESSIONS lost sometimes
Hi Leon and all.
LEON you are misunderstanding how the sessions work. Also please start your
own thread and don't hijack mine.
To the rest that replied. Thanks, I am still stuck with the problem I have
asked the hosting company to check the storage capacity and also any other
issues with the SESSIONS on the server.
However if anyone has other things they think I can look at, I'd appreciate
that very much.
Thanks
Angelo
http://www.elemental.co.za
-----Original Message-----
From: Leon du Plessis [mailto:leon@dsgnit.com]
Sent: 20 August 2009 12:04 PM
To: ash@ashleysheridan.co.uk
Cc: 'Nitebirdz'; php-general@lists.php.net
Subject: RE: [PHP] SESSIONS lost sometimes
Thanks Ashley,
I just want to iterate again that when a new page is opened by another
existing page in a new browser or Tab, the session_id is already created and
therefore the current way browsers work is in no way compremised. The new
browser/tab would receive the session id along with GET or POST variables.
What I am suggesting/hoping is that when a new browser is opened or a new
tab is opened via the application, the protocols would reckognize that this
is the first time the page is served and is not being called from another
page. That is, a new page is loaded by the user entering it, and NOT by
clicking login or some other link from an existing page.
Yes, I know..that creates other scenarios, so is happy to not meddle with
the way browsers work. It is just a limitation I will live with and can get
by with it.
Regards
Leon
-----Original Message-----
From: Ashley Sheridan [mailto:ash@ashleysheridan.co.uk]
Sent: 20 August 2009 11:39 AM
To: Leon du Plessis
Cc: 'Nitebirdz'; php-general@lists.php.net
Subject: RE: [PHP] SESSIONS lost sometimes
On Thu, 2009-08-20 at 10:50 +0200, Leon du Plessis wrote:
> ">> It'd make sense for things to run this way, I think. After all, I'd
> find it quite confusing if I log into Google Docs, open a document (by
> default, it opens in a new tab) and I had to log in yet again to be able
to
> edit it."
>
> Yes. I agree. But in this case the Tab being opened is used with the same
> authentication details either via POST, GET or Cookie variables. The
problem
> comes in when a totally different set of login credentials are being used
> (for the same tab/window). Other user's login particulars should not
affect
> your login variables.
>
> -----Original Message-----
> From: Nitebirdz [mailto:nitebirdz@sacredchaos.com]
> Sent: 20 August 2009 10:40 AM
> To: php-general@lists.php.net
> Subject: Re: [PHP] SESSIONS lost sometimes
>
> On Thu, Aug 20, 2009 at 09:44:02AM +0200, Leon du Plessis wrote:
> >
> > Since we are on the subject: I have the following similar problem:
> >
> > When testing page on internet explorer, I find that one tab's variables
> can
> > affect another tab's variables. Thus when having the same web-site open
> and
> > using SESSION variables but for different users, Internet explorer can
> > become "disorientated". This also "sometimes" happen when I have two
> > separate browsing windows open with Internet Explorer for the same site.
> >
> > I have yet to determine if this is an internet explorer, or PHP or
> > combination of the two that is causing this condition.
> >
> > To my understanding _SESSION variables should be maintained per session,
> tab
> > or window. If this has been addressed already, my apologies, but thought
> it
> > worthwhile to mention.
> >
>
> I'm a total newbie when it comes to these issues, but it seems to me
> that Firefox behaves in the very same manner. It's not limited to PHP
> sessions either. It's always been my experience on any website that
> requires authentication, including the likes of Google Mail, etc. When
> I want to run multiple sessions for different GMail accounts, for
> example, I just create a different user profile in Firefox.
>
> It'd make sense for things to run this way, I think. After all, I'd
> find it quite confusing if I log into Google Docs, open a document (by
> default, it opens in a new tab) and I had to log in yet again to be able
> to edit it.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
The point is you are misunderstanding how browsers work. What the server
app is seeing is a new login that replaces the first. This is the way
browsers work, and if it changed to the idea you have for it, then
millions of sites would suddenly fail to work; i.e. any site that
requires a new tab or window to be opened in order to function, like
banks, etc.
Thanks,
Ash
http://www.ashleysheridan.co.uk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: SESSIONS lost sometimes
am 20.08.2009 14:57:52 von Nitebirdz
On Thu, Aug 20, 2009 at 02:34:54PM +0200, Angelo Zanetti wrote:
> Hi Leon,
>
> No harm intended :) Just thought that people were missing my post now and
> only answering yours.
>
Angelo, excuse me if I'm bringing up something very basic, but I'm new
to this. Just trying to help.
I imagine redirects couldn't be the cause of the problem, right?
http://www.oscarm.org/news/detail/1877-avoiding_frustration_ with_php_sessions
http://www.webmasterworld.com/forum88/8486.htm
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: SESSIONS lost sometimes
am 20.08.2009 15:08:04 von kranthi
The original problem..
>> server is losing session variables.
I dont think PHP is not good at unset() ing variables while the script
is executing.
general logger will be of use in this case (especially when cant
reproduce the problem every time). PEAR, Zend, FirePHP, files... any
thing will do...
try to log every thing related to sessions at the start of the page...
session_id, $_SESSION super global, _SERVER['PHP_SELF']
do the same thing after the script exists...
i had a similar problem earlier...
a page in my app used to change $_SESSION['id']. It took me ages to
find out the source... even grep was of no use... at last i was able
to isolate the page that was causing this, with the help of logging.
Of course, the main problem was that my production server has
register_globals on, while my development server has them off.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: SESSIONS lost sometimes
am 20.08.2009 15:10:06 von Ashley Sheridan
On Thu, 2009-08-20 at 18:38 +0530, kranthi wrote:
> The original problem..
>
> >> server is losing session variables.
> I dont think PHP is not good at unset() ing variables while the script
> is executing.
>
> general logger will be of use in this case (especially when cant
> reproduce the problem every time). PEAR, Zend, FirePHP, files... any
> thing will do...
>
> try to log every thing related to sessions at the start of the page...
> session_id, $_SESSION super global, _SERVER['PHP_SELF']
> do the same thing after the script exists...
>
> i had a similar problem earlier...
> a page in my app used to change $_SESSION['id']. It took me ages to
> find out the source... even grep was of no use... at last i was able
> to isolate the page that was causing this, with the help of logging.
> Of course, the main problem was that my production server has
> register_globals on, while my development server has them off.
>
Register globals is really not a good thing to use for modern setups. It
makes it a little easier for people to exploit holes in weaker PHP
scripts.
Thanks,
Ash
http://www.ashleysheridan.co.uk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
SESSION VARIABLES ACROSS DIFFERENT WINDOWS/TABS
am 20.08.2009 15:16:19 von Leon du Plessis
It is just strange that I have this "condition" now...maybe I missed it a
year ago ?
>> "Having a different session start up for each window for tab would be a
major pain."
Why?
People must please try and understand what I mean by NEW. It does not apply
to windows/tabs being opened from a link or request.
Imho, keeping the session per domain "sounds" wrong, it does not mean it is.
It would have been nice if:
Browser/tab one -> my login detail container A.
Browser/tab two -> my admin login container B.
(tabs/windows opened from browser one, then inherits container A naturally)
(Closing browser one, then destroys container A then naturally only)
NOT
Domain.com -> one session container only.
Heck, I am surprised it works that way at all cause it "sounds" like the
domain can then only handle one user a time if arrays are not used or
profiles not created on FF no matter where the request come from, but, then
I am obviously missing something in this respect as stated. When I have time
I will reconstruct this concept again.
Thanks anyway guys. I received some helpful advise for future reference.
But please..I do not, like many others, want to start a war. I am ok with
things how they are. We can put this thing to rest.
-----Original Message-----
From: Floyd Resler [mailto:fresler@adex-intl.com]
Sent: 20 August 2009 02:25 PM
To: Leon du Plessis
Cc: arno@dotcontent.net; php-general@lists.php.net
Subject: Re: [PHP] SESSIONS lost sometimes
Leon,
Sessions are used on a per-domain basis. So, no matter how many
windows or tabs you have open for mydomain.com it will be the same
session for all. Having a different session start up for each window
or tab would be a major pain. If you needed to keep track of a user
ID, for example, you wouldn't be able to. As already mentioned you
can use different browsers. You can also set up sub-domains which
would each have their own sessions.
Take care,
Floyd
On Aug 20, 2009, at 4:26 AM, Leon du Plessis wrote:
> ">> It's not an issue, it's a feature."
>
> Thanks Arno...but it is a pain also.
> If I work with user A in Tab1 (window1), I want to work with user B
> separately in Tab2. When user in Tab2 logs off, I still want user A
> to work,
> and not suddenly have to re-login. Same with bank. If I work with my
> company
> account, then my personal account must not become an issue because I
> am on
> the same machine and site.
>
> I have no issue with using FF and IE to do testing as that takes
> care of
> browser compatibility testing at the same time :-), but I think when
> you
> start a new session with new values, it should be kept under that
> window/tab
> alone. Cookies can take care of more details, but my opinion is data
> should
> never be affected across windows/tabs unless the same user is logged
> in on
> both....even then I would expect PHP to keep data per session. Maybe
> it goes
> beyond being an IE or FF issue..the questiojn is...will PHP allow
> variables
> from session A become corrupted when session B is in progress when
> they
> should actually be handled seperately?
>
> In the end I think it is something I do wrong in PHP with the SESSION
> variables and how I clear them....if so...I don't think PHP should
> allow
> clearing SESSION variables from other sessions.
>
> -----Original Message-----
> From: Arno Kuhl [mailto:akuhl@telkomsa.net]
> Sent: 20 August 2009 10:03 AM
> To: 'Leon du Plessis'; php-general@lists.php.net
> Subject: RE: [PHP] SESSIONS lost sometimes
>
> -----Original Message-----
> From: Leon du Plessis [mailto:leon@dsgnit.com]
> Sent: 20 August 2009 09:44 AM
> To: php-general@lists.php.net
> Subject: RE: [PHP] SESSIONS lost sometimes
>
> Since we are on the subject: I have the following similar problem:
>
> When testing page on internet explorer, I find that one tab's
> variables can
> affect another tab's variables. Thus when having the same web-site
> open and
> using SESSION variables but for different users, Internet explorer can
> become "disorientated". This also "sometimes" happen when I have two
> separate browsing windows open with Internet Explorer for the same
> site.
>
> I have yet to determine if this is an internet explorer, or PHP or
> combination of the two that is causing this condition.
>
> To my understanding _SESSION variables should be maintained per
> session, tab
> or window. If this has been addressed already, my apologies, but
> thought it
> worthwhile to mention.
>
> If someone perhaps have a solution or can confirm this as a known
> issue and
> maybe is the same or related to Angelo's problem?
>
> --------------------
>
> If different browser windows/tabs on the same client-side computer
> didn't
> share session info then you'd get the effect of being able to log
> onto a
> site with one browser window, but find in a second browser window
> that you
> were not yet logged on. Experience will tell you that you're logged
> on in
> both browser windows (try it with your online bank). It's not an
> issue, it's
> a feature. If you want to be able to use different browser windows
> as though
> they were different users then use different browsers e.g. IE and FF
> on the
> same client-side computer will look like two separate end users to the
> server, and they don't share session info or cookies.
>
> Cheers
> Arno
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: SESSIONS lost sometimes
am 20.08.2009 15:17:53 von kranthi
>> I imagine redirects couldn't be the cause of the problem, right?
Thanks, this is really a life saver.. I never used
session_write_close() before any redirects...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: SESSION VARIABLES ACROSS DIFFERENT WINDOWS/TABS
am 20.08.2009 15:18:00 von Ashley Sheridan
On Thu, 2009-08-20 at 15:16 +0200, Leon du Plessis wrote:
> It is just strange that I have this "condition" now...maybe I missed it a
> year ago ?
>
> >> "Having a different session start up for each window for tab would be a
> major pain."
>
> Why?
>
> People must please try and understand what I mean by NEW. It does not apply
> to windows/tabs being opened from a link or request.
>
> Imho, keeping the session per domain "sounds" wrong, it does not mean it is.
> It would have been nice if:
>
> Browser/tab one -> my login detail container A.
> Browser/tab two -> my admin login container B.
> (tabs/windows opened from browser one, then inherits container A naturally)
> (Closing browser one, then destroys container A then naturally only)
>
> NOT
>
> Domain.com -> one session container only.
>
> Heck, I am surprised it works that way at all cause it "sounds" like the
> domain can then only handle one user a time if arrays are not used or
> profiles not created on FF no matter where the request come from, but, then
> I am obviously missing something in this respect as stated. When I have time
> I will reconstruct this concept again.
>
> Thanks anyway guys. I received some helpful advise for future reference.
>
> But please..I do not, like many others, want to start a war. I am ok with
> things how they are. We can put this thing to rest.
>
> -----Original Message-----
> From: Floyd Resler [mailto:fresler@adex-intl.com]
> Sent: 20 August 2009 02:25 PM
> To: Leon du Plessis
> Cc: arno@dotcontent.net; php-general@lists.php.net
> Subject: Re: [PHP] SESSIONS lost sometimes
>
> Leon,
> Sessions are used on a per-domain basis. So, no matter how many
> windows or tabs you have open for mydomain.com it will be the same
> session for all. Having a different session start up for each window
> or tab would be a major pain. If you needed to keep track of a user
> ID, for example, you wouldn't be able to. As already mentioned you
> can use different browsers. You can also set up sub-domains which
> would each have their own sessions.
>
> Take care,
> Floyd
>
> On Aug 20, 2009, at 4:26 AM, Leon du Plessis wrote:
>
> > ">> It's not an issue, it's a feature."
> >
> > Thanks Arno...but it is a pain also.
> > If I work with user A in Tab1 (window1), I want to work with user B
> > separately in Tab2. When user in Tab2 logs off, I still want user A
> > to work,
> > and not suddenly have to re-login. Same with bank. If I work with my
> > company
> > account, then my personal account must not become an issue because I
> > am on
> > the same machine and site.
> >
> > I have no issue with using FF and IE to do testing as that takes
> > care of
> > browser compatibility testing at the same time :-), but I think when
> > you
> > start a new session with new values, it should be kept under that
> > window/tab
> > alone. Cookies can take care of more details, but my opinion is data
> > should
> > never be affected across windows/tabs unless the same user is logged
> > in on
> > both....even then I would expect PHP to keep data per session. Maybe
> > it goes
> > beyond being an IE or FF issue..the questiojn is...will PHP allow
> > variables
> > from session A become corrupted when session B is in progress when
> > they
> > should actually be handled seperately?
> >
> > In the end I think it is something I do wrong in PHP with the SESSION
> > variables and how I clear them....if so...I don't think PHP should
> > allow
> > clearing SESSION variables from other sessions.
> >
> > -----Original Message-----
> > From: Arno Kuhl [mailto:akuhl@telkomsa.net]
> > Sent: 20 August 2009 10:03 AM
> > To: 'Leon du Plessis'; php-general@lists.php.net
> > Subject: RE: [PHP] SESSIONS lost sometimes
> >
> > -----Original Message-----
> > From: Leon du Plessis [mailto:leon@dsgnit.com]
> > Sent: 20 August 2009 09:44 AM
> > To: php-general@lists.php.net
> > Subject: RE: [PHP] SESSIONS lost sometimes
> >
> > Since we are on the subject: I have the following similar problem:
> >
> > When testing page on internet explorer, I find that one tab's
> > variables can
> > affect another tab's variables. Thus when having the same web-site
> > open and
> > using SESSION variables but for different users, Internet explorer can
> > become "disorientated". This also "sometimes" happen when I have two
> > separate browsing windows open with Internet Explorer for the same
> > site.
> >
> > I have yet to determine if this is an internet explorer, or PHP or
> > combination of the two that is causing this condition.
> >
> > To my understanding _SESSION variables should be maintained per
> > session, tab
> > or window. If this has been addressed already, my apologies, but
> > thought it
> > worthwhile to mention.
> >
> > If someone perhaps have a solution or can confirm this as a known
> > issue and
> > maybe is the same or related to Angelo's problem?
> >
> > --------------------
> >
> > If different browser windows/tabs on the same client-side computer
> > didn't
> > share session info then you'd get the effect of being able to log
> > onto a
> > site with one browser window, but find in a second browser window
> > that you
> > were not yet logged on. Experience will tell you that you're logged
> > on in
> > both browser windows (try it with your online bank). It's not an
> > issue, it's
> > a feature. If you want to be able to use different browser windows
> > as though
> > they were different users then use different browsers e.g. IE and FF
> > on the
> > same client-side computer will look like two separate end users to the
> > server, and they don't share session info or cookies.
> >
> > Cheers
> > Arno
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
There is a good reason for it if you think about it. Even handling
sessions your way, you are potentially entering a minefield of xss
attacks.
Thanks,
Ash
http://www.ashleysheridan.co.uk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: SESSION VARIABLES ACROSS DIFFERENT WINDOWS/TABS
am 20.08.2009 21:48:38 von Jaime Bozza
Leon,
This is really just a function of the browser. When a session cookie is c=
reated, if the browser is setup for a single instance, that's the session c=
ookie it'll use for *any* request to that domain. This functions different=
ly depending on what browser you're using.
For example:
Firefox - All windows, tabs, etc, under the same profile will use the same =
session. If you create profiles, you can have different sessions.
IE7, IE6 - All tabs or windows opened from clicks will share the same insta=
nce/session. Starting IE from the icon will open up a "new" instance/sessi=
on. This worked great if you wanted to run two different sessions at the s=
ame site/domain. Just start IE up from the icon again and you'd have a new=
session.
IE8 - IE8 model changed, so that all browser windows, tabs, etc., run under=
the same frame/session, much like Firefox. Clicking the IE icon again now=
just keeps the same frame and thus the same session. Originally, this sou=
nded like a big problem, but IE8 introduced a new feature - File Menu -> Ne=
w Session. This will open up a new window that will be a separate frame t=
hat will not use current session cookies.
Here's just one of many links, but gives some helpful hints on the IE side:
http://blogs.msdn.com/ie/archive/2009/05/06/session-cookies- sessionstorage-=
and-ie8.aspx
And another:
http://blogs.msdn.com/askie/archive/2009/05/08/session-manag ement-within-in=
ternet-explorer-8-0.aspx
One of the issues now is that if you close IE, your session does not disapp=
ear. In the past (IE7/IE6), your session would disappear if you closed a b=
rowser window that you opened yourself, but it *wouldn't* disappear if you =
closed a browser window that was opened by a click from Outlook or another =
program. This was a bit inconsistent. I won't argue whether or not their =
"fix" was the best way to go, but now it's at least consistent.
Note - In Firefox, not even "Private Browsing" separates the session cookie=
s. If you start Private Browsing (Firefox 3.5), log into a site, then star=
t a new browser window from the icon (that isn't in Private Browsing mode),=
it shares the session cookies. (Before you ask, I just checked this to be =
sure.)
IE8 "InPrivate Mode" is a totally separate session, cookies and all. This =
could possibly be another way for you to run multiple sessions against the =
same domain. OTOH, multiple InPrivate sessions running at the same time sh=
are the same frame, so they share the same session, so it would only be goo=
d for a single new session. If you need more, just use File - New Session.
Jaime=20
> -----Original Message-----
> From: Leon du Plessis [mailto:leon@dsgnit.com]
> Sent: Thursday, August 20, 2009 8:16 AM
> To: 'Floyd Resler'
> Cc: arno@dotcontent.net; php-general@lists.php.net
> Subject: [PHP] SESSION VARIABLES ACROSS DIFFERENT WINDOWS/TABS
>=20
> It is just strange that I have this "condition" now...maybe I missed it
> a
> year ago ?
>=20
> >> "Having a different session start up for each window for tab would
> be a
> major pain."
>=20
> Why?
>=20
> People must please try and understand what I mean by NEW. It does not
> apply
> to windows/tabs being opened from a link or request.
>=20
> Imho, keeping the session per domain "sounds" wrong, it does not mean
> it is.
> It would have been nice if:
>=20
> Browser/tab one -> my login detail container A.
> Browser/tab two -> my admin login container B.
> (tabs/windows opened from browser one, then inherits container A
> naturally)
> (Closing browser one, then destroys container A then naturally only)
>=20
> NOT
>=20
> Domain.com -> one session container only.
>=20
> Heck, I am surprised it works that way at all cause it "sounds" like
> the
> domain can then only handle one user a time if arrays are not used or
> profiles not created on FF no matter where the request come from, but,
> then
> I am obviously missing something in this respect as stated. When I have
> time
> I will reconstruct this concept again.
>=20
> Thanks anyway guys. I received some helpful advise for future
> reference.
>=20
> But please..I do not, like many others, want to start a war. I am ok
> with
> things how they are. We can put this thing to rest.
>=20
> -----Original Message-----
> From: Floyd Resler [mailto:fresler@adex-intl.com]
> Sent: 20 August 2009 02:25 PM
> To: Leon du Plessis
> Cc: arno@dotcontent.net; php-general@lists.php.net
> Subject: Re: [PHP] SESSIONS lost sometimes
>=20
> Leon,
> Sessions are used on a per-domain basis. So, no matter how many
> windows or tabs you have open for mydomain.com it will be the same
> session for all. Having a different session start up for each window
> or tab would be a major pain. If you needed to keep track of a user
> ID, for example, you wouldn't be able to. As already mentioned you
> can use different browsers. You can also set up sub-domains which
> would each have their own sessions.
>=20
> Take care,
> Floyd
>=20
> On Aug 20, 2009, at 4:26 AM, Leon du Plessis wrote:
>=20
> > ">> It's not an issue, it's a feature."
> >
> > Thanks Arno...but it is a pain also.
> > If I work with user A in Tab1 (window1), I want to work with user B
> > separately in Tab2. When user in Tab2 logs off, I still want user A
> > to work,
> > and not suddenly have to re-login. Same with bank. If I work with my
> > company
> > account, then my personal account must not become an issue because I
> > am on
> > the same machine and site.
> >
> > I have no issue with using FF and IE to do testing as that takes
> > care of
> > browser compatibility testing at the same time :-), but I think when
> > you
> > start a new session with new values, it should be kept under that
> > window/tab
> > alone. Cookies can take care of more details, but my opinion is data
> > should
> > never be affected across windows/tabs unless the same user is logged
> > in on
> > both....even then I would expect PHP to keep data per session. Maybe
> > it goes
> > beyond being an IE or FF issue..the questiojn is...will PHP allow
> > variables
> > from session A become corrupted when session B is in progress when
> > they
> > should actually be handled seperately?
> >
> > In the end I think it is something I do wrong in PHP with the SESSION
> > variables and how I clear them....if so...I don't think PHP should
> > allow
> > clearing SESSION variables from other sessions.
> >
> > -----Original Message-----
> > From: Arno Kuhl [mailto:akuhl@telkomsa.net]
> > Sent: 20 August 2009 10:03 AM
> > To: 'Leon du Plessis'; php-general@lists.php.net
> > Subject: RE: [PHP] SESSIONS lost sometimes
> >
> > -----Original Message-----
> > From: Leon du Plessis [mailto:leon@dsgnit.com]
> > Sent: 20 August 2009 09:44 AM
> > To: php-general@lists.php.net
> > Subject: RE: [PHP] SESSIONS lost sometimes
> >
> > Since we are on the subject: I have the following similar problem:
> >
> > When testing page on internet explorer, I find that one tab's
> > variables can
> > affect another tab's variables. Thus when having the same web-site
> > open and
> > using SESSION variables but for different users, Internet explorer
> can
> > become "disorientated". This also "sometimes" happen when I have two
> > separate browsing windows open with Internet Explorer for the same
> > site.
> >
> > I have yet to determine if this is an internet explorer, or PHP or
> > combination of the two that is causing this condition.
> >
> > To my understanding _SESSION variables should be maintained per
> > session, tab
> > or window. If this has been addressed already, my apologies, but
> > thought it
> > worthwhile to mention.
> >
> > If someone perhaps have a solution or can confirm this as a known
> > issue and
> > maybe is the same or related to Angelo's problem?
> >
> > --------------------
> >
> > If different browser windows/tabs on the same client-side computer
> > didn't
> > share session info then you'd get the effect of being able to log
> > onto a
> > site with one browser window, but find in a second browser window
> > that you
> > were not yet logged on. Experience will tell you that you're logged
> > on in
> > both browser windows (try it with your online bank). It's not an
> > issue, it's
> > a feature. If you want to be able to use different browser windows
> > as though
> > they were different users then use different browsers e.g. IE and FF
> > on the
> > same client-side computer will look like two separate end users to
> the
> > server, and they don't share session info or cookies.
> >
> > Cheers
> > Arno
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>=20
>=20
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: SESSION VARIABLES ACROSS DIFFERENT WINDOWS/TABS
am 21.08.2009 11:04:43 von Leon du Plessis
Hi Jamie.
Thanks. Good info. I knew something changed somewhere. This works like a
charm in IE8..never saw the New Session option under file...me bad !!
Greetings.
-----Original Message-----
From: Jaime Bozza [mailto:jbozza@mindsites.com]
Sent: 20 August 2009 09:49 PM
To: Leon du Plessis; 'Floyd Resler'
Cc: arno@dotcontent.net; php-general@lists.php.net
Subject: RE: [PHP] SESSION VARIABLES ACROSS DIFFERENT WINDOWS/TABS
Leon,
This is really just a function of the browser. When a session cookie is
created, if the browser is setup for a single instance, that's the session
cookie it'll use for *any* request to that domain. This functions
differently depending on what browser you're using.
For example:
Firefox - All windows, tabs, etc, under the same profile will use the same
session. If you create profiles, you can have different sessions.
IE7, IE6 - All tabs or windows opened from clicks will share the same
instance/session. Starting IE from the icon will open up a "new"
instance/session. This worked great if you wanted to run two different
sessions at the same site/domain. Just start IE up from the icon again and
you'd have a new session.
IE8 - IE8 model changed, so that all browser windows, tabs, etc., run under
the same frame/session, much like Firefox. Clicking the IE icon again now
just keeps the same frame and thus the same session. Originally, this
sounded like a big problem, but IE8 introduced a new feature - File Menu ->
New Session. This will open up a new window that will be a separate frame
that will not use current session cookies.
Here's just one of many links, but gives some helpful hints on the IE side:
http://blogs.msdn.com/ie/archive/2009/05/06/session-cookies- sessionstorage-a
nd-ie8.aspx
And another:
http://blogs.msdn.com/askie/archive/2009/05/08/session-manag ement-within-int
ernet-explorer-8-0.aspx
One of the issues now is that if you close IE, your session does not
disappear. In the past (IE7/IE6), your session would disappear if you
closed a browser window that you opened yourself, but it *wouldn't*
disappear if you closed a browser window that was opened by a click from
Outlook or another program. This was a bit inconsistent. I won't argue
whether or not their "fix" was the best way to go, but now it's at least
consistent.
Note - In Firefox, not even "Private Browsing" separates the session
cookies. If you start Private Browsing (Firefox 3.5), log into a site, then
start a new browser window from the icon (that isn't in Private Browsing
mode), it shares the session cookies. (Before you ask, I just checked this
to be sure.)
IE8 "InPrivate Mode" is a totally separate session, cookies and all. This
could possibly be another way for you to run multiple sessions against the
same domain. OTOH, multiple InPrivate sessions running at the same time
share the same frame, so they share the same session, so it would only be
good for a single new session. If you need more, just use File - New
Session.
Jaime
> -----Original Message-----
> From: Leon du Plessis [mailto:leon@dsgnit.com]
> Sent: Thursday, August 20, 2009 8:16 AM
> To: 'Floyd Resler'
> Cc: arno@dotcontent.net; php-general@lists.php.net
> Subject: [PHP] SESSION VARIABLES ACROSS DIFFERENT WINDOWS/TABS
>
> It is just strange that I have this "condition" now...maybe I missed it
> a
> year ago ?
>
> >> "Having a different session start up for each window for tab would
> be a
> major pain."
>
> Why?
>
> People must please try and understand what I mean by NEW. It does not
> apply
> to windows/tabs being opened from a link or request.
>
> Imho, keeping the session per domain "sounds" wrong, it does not mean
> it is.
> It would have been nice if:
>
> Browser/tab one -> my login detail container A.
> Browser/tab two -> my admin login container B.
> (tabs/windows opened from browser one, then inherits container A
> naturally)
> (Closing browser one, then destroys container A then naturally only)
>
> NOT
>
> Domain.com -> one session container only.
>
> Heck, I am surprised it works that way at all cause it "sounds" like
> the
> domain can then only handle one user a time if arrays are not used or
> profiles not created on FF no matter where the request come from, but,
> then
> I am obviously missing something in this respect as stated. When I have
> time
> I will reconstruct this concept again.
>
> Thanks anyway guys. I received some helpful advise for future
> reference.
>
> But please..I do not, like many others, want to start a war. I am ok
> with
> things how they are. We can put this thing to rest.
>
> -----Original Message-----
> From: Floyd Resler [mailto:fresler@adex-intl.com]
> Sent: 20 August 2009 02:25 PM
> To: Leon du Plessis
> Cc: arno@dotcontent.net; php-general@lists.php.net
> Subject: Re: [PHP] SESSIONS lost sometimes
>
> Leon,
> Sessions are used on a per-domain basis. So, no matter how many
> windows or tabs you have open for mydomain.com it will be the same
> session for all. Having a different session start up for each window
> or tab would be a major pain. If you needed to keep track of a user
> ID, for example, you wouldn't be able to. As already mentioned you
> can use different browsers. You can also set up sub-domains which
> would each have their own sessions.
>
> Take care,
> Floyd
>
> On Aug 20, 2009, at 4:26 AM, Leon du Plessis wrote:
>
> > ">> It's not an issue, it's a feature."
> >
> > Thanks Arno...but it is a pain also.
> > If I work with user A in Tab1 (window1), I want to work with user B
> > separately in Tab2. When user in Tab2 logs off, I still want user A
> > to work,
> > and not suddenly have to re-login. Same with bank. If I work with my
> > company
> > account, then my personal account must not become an issue because I
> > am on
> > the same machine and site.
> >
> > I have no issue with using FF and IE to do testing as that takes
> > care of
> > browser compatibility testing at the same time :-), but I think when
> > you
> > start a new session with new values, it should be kept under that
> > window/tab
> > alone. Cookies can take care of more details, but my opinion is data
> > should
> > never be affected across windows/tabs unless the same user is logged
> > in on
> > both....even then I would expect PHP to keep data per session. Maybe
> > it goes
> > beyond being an IE or FF issue..the questiojn is...will PHP allow
> > variables
> > from session A become corrupted when session B is in progress when
> > they
> > should actually be handled seperately?
> >
> > In the end I think it is something I do wrong in PHP with the SESSION
> > variables and how I clear them....if so...I don't think PHP should
> > allow
> > clearing SESSION variables from other sessions.
> >
> > -----Original Message-----
> > From: Arno Kuhl [mailto:akuhl@telkomsa.net]
> > Sent: 20 August 2009 10:03 AM
> > To: 'Leon du Plessis'; php-general@lists.php.net
> > Subject: RE: [PHP] SESSIONS lost sometimes
> >
> > -----Original Message-----
> > From: Leon du Plessis [mailto:leon@dsgnit.com]
> > Sent: 20 August 2009 09:44 AM
> > To: php-general@lists.php.net
> > Subject: RE: [PHP] SESSIONS lost sometimes
> >
> > Since we are on the subject: I have the following similar problem:
> >
> > When testing page on internet explorer, I find that one tab's
> > variables can
> > affect another tab's variables. Thus when having the same web-site
> > open and
> > using SESSION variables but for different users, Internet explorer
> can
> > become "disorientated". This also "sometimes" happen when I have two
> > separate browsing windows open with Internet Explorer for the same
> > site.
> >
> > I have yet to determine if this is an internet explorer, or PHP or
> > combination of the two that is causing this condition.
> >
> > To my understanding _SESSION variables should be maintained per
> > session, tab
> > or window. If this has been addressed already, my apologies, but
> > thought it
> > worthwhile to mention.
> >
> > If someone perhaps have a solution or can confirm this as a known
> > issue and
> > maybe is the same or related to Angelo's problem?
> >
> > --------------------
> >
> > If different browser windows/tabs on the same client-side computer
> > didn't
> > share session info then you'd get the effect of being able to log
> > onto a
> > site with one browser window, but find in a second browser window
> > that you
> > were not yet logged on. Experience will tell you that you're logged
> > on in
> > both browser windows (try it with your online bank). It's not an
> > issue, it's
> > a feature. If you want to be able to use different browser windows
> > as though
> > they were different users then use different browsers e.g. IE and FF
> > on the
> > same client-side computer will look like two separate end users to
> the
> > server, and they don't share session info or cookies.
> >
> > Cheers
> > Arno
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: SESSIONS lost sometimes
am 24.08.2009 16:30:19 von angelo
-----Original Message-----
From: Nitebirdz [mailto:nitebirdz@sacredchaos.com]
Sent: 20 August 2009 02:58 PM
To: php-general@lists.php.net
Subject: Re: [PHP] SESSIONS lost sometimes
On Thu, Aug 20, 2009 at 02:34:54PM +0200, Angelo Zanetti wrote:
> Hi Leon,
>
> No harm intended :) Just thought that people were missing my post now and
> only answering yours.
>
Angelo, excuse me if I'm bringing up something very basic, but I'm new
to this. Just trying to help.
I imagine redirects couldn't be the cause of the problem, right?
http://www.oscarm.org/news/detail/1877-avoiding_frustration_ with_php_session
s
http://www.webmasterworld.com/forum88/8486.htm
Hi thanks for the links it appears that its all in order also I'm not losing
SESSIONS on the redirect but somewhere else.
I have checked the garbage collection, disk space and other settings in the
PHP.ini file. ALL FINE.
So now I am really stuck and confused as to what could sometimes cause the
loss of these variables and other times it just works fine.
Is there possibly a way that I can call some function that will ensure that
the sessions are saved (I checked the manual - nothing much).
Any other ideas? Anything that you think might be causing issues?
Thanks
Angelo
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: SESSIONS lost sometimes - SOLVED
am 26.08.2009 16:27:51 von angelo
-----Original Message-----
From: Angelo Zanetti [mailto:angelo@zlogic.co.za]
Sent: 24 August 2009 04:30 PM
To: 'Nitebirdz'; php-general@lists.php.net
Subject: RE: [PHP] SESSIONS lost sometimes
-----Original Message-----
From: Nitebirdz [mailto:nitebirdz@sacredchaos.com]
Sent: 20 August 2009 02:58 PM
To: php-general@lists.php.net
Subject: Re: [PHP] SESSIONS lost sometimes
On Thu, Aug 20, 2009 at 02:34:54PM +0200, Angelo Zanetti wrote:
> Hi Leon,
>
> No harm intended :) Just thought that people were missing my post now and
> only answering yours.
>
Angelo, excuse me if I'm bringing up something very basic, but I'm new
to this. Just trying to help.
I imagine redirects couldn't be the cause of the problem, right?
http://www.oscarm.org/news/detail/1877-avoiding_frustration_ with_php_session
s
http://www.webmasterworld.com/forum88/8486.htm
Hi thanks for the links it appears that its all in order also I'm not losing
SESSIONS on the redirect but somewhere else.
I have checked the garbage collection, disk space and other settings in the
PHP.ini file. ALL FINE.
So now I am really stuck and confused as to what could sometimes cause the
loss of these variables and other times it just works fine.
Is there possibly a way that I can call some function that will ensure that
the sessions are saved (I checked the manual - nothing much).
Any other ideas? Anything that you think might be causing issues?
Thanks
Angelo
Hi all,
I have solved the issue of lost session variables.
It appeared to be losing the SESSION variables when going from a POST from
HTTP to HTTPS, however it didn't always happen, so the logging allowed me to
narrow down where the losing was occurring.
The solution.
In my form that I post from the HTTP site, I put a hidden variable in there
and with the session variable.
In HTTPS it sometimes doesn't carry over the hidden variable therefore we
need to start the session with the old SESSION ID from the HTTP site.
So what I did was the following on the https site:
if (isset($_POST['sessionID']))
{
//http://stackoverflow.com/questions/441496/session-lost-whe n-switching-from
-http-to-https-in-php
// Retrieve the session ID as passed via the GET method.
$currentSessionID = $_POST['sessionID'];
//echo $currentSessionID;
// Set a cookie for the session ID.
$sessionid2 = session_id($currentSessionID);
}
Therefore setting the session ID with the session_id() function. This must
go before the session_start() function!!! Very NB!.
Hope this helps anyone who has a similar problem.
Regards
Angelo
http://www.elemental.co.za
http://www.wapit.co.za
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php