473,568 Members | 2,795 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 6002
After step 2 try to add the session_start()

on the top of page B....

point
"Nick" <zh*******@hotm ail.com> wrote in message
news:ee******** *************** ***@posting.goo gle.com...
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**@caanprodu ction.com> wrote in message news:<be******* *@enews2.newsgu y.com>...
After step 2 try to add the session_start()

on the top of page B....

point
"Nick" <zh*******@hotm ail.com> wrote in message
news:ee******** *************** ***@posting.goo gle.com...
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
2837
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 client browser when the app is accessed the session variable returns null inspite of a value being already set. I have checked the IIS enable...
7
7180
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 some properties objUserInfo.UserName = txtUserName.text.trim objUserInfo...
0
2069
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 Session Data lost randomly and Session State sometime expired early. I pretty run out the solution to fix this problem. Althoug we use Web Farm but...
6
12962
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 opened via javascript. This new window is on the SAME website as where the user is located, but just opened in HTTPS (secure) mode - the user can now...
9
2089
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" sqlConnectionString="data source=myserver;user id=myuser;password=mypw" cookieless="false" timeout="20" /> This seems to work. But we have cases, when users...
3
2596
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 database. To test, I've created two test aspx pages. Test1.aspx contains two buttons. The first button sets values in the session object and then...
7
2952
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 statServer timeout to 20 min in the the web.config file. Any ideas why the variables are lost?
2
4238
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 lost, but not frequently. However, since the past 2 weeks, I am noticing an alarming increase of such session variables lost cases. My application log...
43
3388
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
14863
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 done in 3 steps: Step 1. Normal http login page. Step 2. A page called login.php that takes the posted username, stores it as $_SESSION, and registers...
0
7693
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7604
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8117
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7962
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6275
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2101
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
932
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.