473,418 Members | 2,177 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,418 software developers and data experts.

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 5994
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Microsoft | last post by:
I am using Session variables in my ASP application. I have tested the application on a Win2k professional and it works fine. When the same web app is installed on a win2k advanced server from the...
7
by: Billy Jacobs | last post by:
I am having a problem with my session variable being set to Null for no apparent reason. I am declaring it like the following when the user logs in. dim objUserInfo as new clsUserInfo 'Set...
0
by: CJ | last post by:
Hi We have Session Data lost randomly and Session State expired early. Our Intranet Application uses Window Server 2003 and .Net Framework 1.1. We set Session Time out to 60 minutes. but user...
6
by: Tony G. | last post by:
Hi there, I have an APS 3 application, running on a Windows 2003 Web edition server - it is a very busy website, and when users are click on certain links (membership info), a new window i...
9
by: Patrick | last post by:
Hello I'm running two Webservers Using ASP.NET. both are running the same ASP.NET Application, with <sessionState mode="SQLServer" stateConnectionString="tcpip=127.0.0.1:42424"...
3
by: William | last post by:
Hi I have an ASP.NET application that connects to an Access database. Everything works fine except for the Session object. Data in the session object is lost after I've made a call to the...
7
by: Erik | last post by:
I have an application that uses sessions variables a lot but one I publish the application on the prod server these variables are lost. The application is written i c# 2.0 and I've set the...
2
by: maxkumar | last post by:
Hi, I am running a ASP.NET 1.1 site on Win Server 2003 with IIS 6.0. The website has been running for about 1.5 years now. In the past, we used to have random cases of session variables getting...
43
by: davidkoree | last post by:
I mean not about cookie. Does it have something to do with operating system or browser plugin? I appreciate any help.
22
by: K. A. | last post by:
I have two servers at work, 'A' for testing and development, and server 'B' for production. On server A, I wrote a PHP test code to login users then direct them to a personalized page. This is...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.