468,249 Members | 1,488 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,249 developers. It's quick & easy.

session lost

hi there,

When I did the following steps the session in window A lost.

1.) authenticate user in window A and set $_SESSION['userId']="joe".
2.) open a new window B by clicking a button (in window A) which calls
window.open(..).
3.) I can get the $_SESSION['userId'] in window B (which is what I
want)
4.) When I close window B (manualy or programmaticaly), window A can
not know $_SESSION['userId'] any more.

5.) If I do NOT close window B, window A knows $_SESSION['userId']
without any problem.

This looks like window A passes session info to window B and shares it
with window B. But when window B is closed window A thinks the shared
session is killed.

How can I let window A keep the session even window B is closed?

I am using PHP 4.21 on windows 2000 server SP2.
Thanks in advance!
Jul 16 '05 #1
2 5677
After step 2 try to add the session_start()

on the top of page B....

point
"Nick" <zh*******@hotmail.com> wrote in message
news:ee**************************@posting.google.c om...
hi there,

When I did the following steps the session in window A lost.

1.) authenticate user in window A and set $_SESSION['userId']="joe".
2.) open a new window B by clicking a button (in window A) which calls
window.open(..).
3.) I can get the $_SESSION['userId'] in window B (which is what I
want)
4.) When I close window B (manualy or programmaticaly), window A can
not know $_SESSION['userId'] any more.

5.) If I do NOT close window B, window A knows $_SESSION['userId']
without any problem.

This looks like window A passes session info to window B and shares it
with window B. But when window B is closed window A thinks the shared
session is killed.

How can I let window A keep the session even window B is closed?

I am using PHP 4.21 on windows 2000 server SP2.
Thanks in advance!

Jul 16 '05 #2
Hi point,

Thank you for your reply.

Something really strange happened.
I tried your idea ( add session_start() at the beginning of the B
window) this morning before I went shopping and it sovled the problem!
Great!!
But when I came back and opened the app this afternoon, all the sudden
it did not work any more ( I mean I lost the session again in window A
). I am confused because I did not change any code.

Any idea about it?

Thanks.

"point" <in**@caanproduction.com> wrote in message news:<be********@enews2.newsguy.com>...
After step 2 try to add the session_start()

on the top of page B....

point
"Nick" <zh*******@hotmail.com> wrote in message
news:ee**************************@posting.google.c om...
hi there,

When I did the following steps the session in window A lost.

1.) authenticate user in window A and set $_SESSION['userId']="joe".
2.) open a new window B by clicking a button (in window A) which calls
window.open(..).
3.) I can get the $_SESSION['userId'] in window B (which is what I
want)
4.) When I close window B (manualy or programmaticaly), window A can
not know $_SESSION['userId'] any more.

5.) If I do NOT close window B, window A knows $_SESSION['userId']
without any problem.

This looks like window A passes session info to window B and shares it
with window B. But when window B is closed window A thinks the shared
session is killed.

How can I let window A keep the session even window B is closed?

I am using PHP 4.21 on windows 2000 server SP2.
Thanks in advance!

Jul 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Microsoft | last post: by
7 posts views Thread by Billy Jacobs | last post: by
9 posts views Thread by Patrick | last post: by
3 posts views Thread by William | last post: by
7 posts views Thread by Erik | last post: by
2 posts views Thread by maxkumar | last post: by
22 posts views Thread by K. A. | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.