473,385 Members | 1,468 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,385 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 5991
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.