473,666 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is session variable valid for second explorer windows.

i am running php script which creates session and stores some value in
session variables. then this file calls the another php script which
displays the values stored in session variables.

as far as i have no problem. but after running above steps, i am
leaving the explorer open. then i am opening new explorer and running
directly the second php script. this script displays the values stored
in session variables. should this happen????????

according to me this should not happen because session is related with
opened browser window and not with browser.

guide me regarding this........

thxs for help in advance

Jul 17 '05 #1
4 2284
vishal wrote:
i am running php script which creates session and stores some value in
session variables. then this file calls the another php script which
displays the values stored in session variables.

as far as i have no problem. but after running above steps, i am
leaving the explorer open. then i am opening new explorer and running
directly the second php script. this script displays the values stored
in session variables. should this happen????????
Yes.

according to me this should not happen because session is related with
opened browser window and not with browser.
You understood wrong.

This is how it works:
A browser has stored a serie of cookies from certain sites.
One of them is PHPSESSIONID (or whatever you decided to call it), and that
cookie contains a number: your sessionid.

If you open a new window, AND visit a site that is found in your cookies,
that corresponding cookie is send with the request.

So you share the same session between windows.

Tip:
If you don't want this behavious during development:
On Mozilla you have the oppertunity to create different profiles.
Each profile contains their own set of cookies.
So you CAN open two windows that do not share the same set of cookies.

I use that approach often during development, when I don't want to log out
and log in again as a different user.
EG: In one window(profile) I am admin, and in the other I am a normal user.
But you cannot expect your visitors to do the same.

Hope that helps.

Regards,
Erwin Moller

guide me regarding this........

thxs for help in advance


Jul 17 '05 #2
vishal <vi************ @yahoo.co.in> wrote:
[session]
as far as i have no problem. but after running above steps, i am
leaving the explorer open. then i am opening new explorer and running
directly the second php script. this script displays the values stored
in session variables. should this happen???????? according to me this should not happen because session is related with
opened browser window and not with browser.

guide me regarding this........


Depends, with explorer you mean IE? How do you open the new one? IIRC
you can create a new window in 2 ways:
-open new window from within running one
-start new instance (IIRC configurable somehwere in the bloddy thing)

The first one will share session cookies, the second one doesn't.

Jul 17 '05 #3
"vishal" <vi************ @yahoo.co.in> wrote in message
news:11******** **************@ g14g2000cwa.goo glegroups.com.. .
i am running php script which creates session and stores some value in
session variables. then this file calls the another php script which
displays the values stored in session variables.

as far as i have no problem. but after running above steps, i am
leaving the explorer open. then i am opening new explorer and running
directly the second php script. this script displays the values stored
in session variables. should this happen????????

according to me this should not happen because session is related with
opened browser window and not with browser.

guide me regarding this........

thxs for help in advance


It's a confusing subject. As Daniel pointed out, session cookies are shared
between IE windows if they belong to the same IE process. An IE windows
opened from/by another IE window is owned by the process of that window.
There are a number of way where this happens:

1) File > New > Window
2) Right click > Open in new window
3) target attribute in anchor and form tags
4) javascript open()

Browser windows that are opened from the start menu, the task bar, or by
double clicking on iexplore.exe, are owned by different processes, so they
do not share session cookies. The exception to that is when the computer has
less than 32meg of RAM, in which case there's always only one instance of
IE.

Persistent cookies are always shared between browser windows, provided that
the domain name matches.
Jul 17 '05 #4
thxs for reply.

you cleared my doubts

Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
7780
by: Paul | last post by:
Hmmm, didn't seem to work. I have set session.use_cookies = 1 and session.use_trans_sid = 1 in my php.ini file. Index.php contains: ---------------------------------------------------------------------------- <?php ini_set("session.use_cookies", "off"); ini_set("session.use_trans_sid", "on"); session_start(); $_SESSION = ""; $_SESSION = ""; echo "<form method='POST' action='login.php'>
27
7111
by: mrbog | last post by:
Tell me if my assertion is wrong here: The only way to prevent session hijacking is to NEVER store authentication information (such as name/password) in the session. Well, to never authenticate a user from information you got from the session. Each secure app on a site must challenge the user for name and password, each and every time the user accesses it (not just once and then store it in the session). If a secure app is multi-page,...
2
3304
by: Damien | last post by:
Hi to all, I'm currently re-designing our intranet : nice and lean CSS2, cleaned-up PHP 4.3.7, better-normalized MySQL ;o). So I've started using the $_SESSION variable instead of register_globals and a couple "better pratice" code. Not perfect, but better. Problem : I'm testing everything with Firefox on my machine (IIS on WinXP Pro), and everything is ok. As soon as I try MS IE 6, it doesn't seem to keep the sessions from page to...
3
7763
by: Rob Locher | last post by:
I have a server running NT 4 Server that is on my local domain that hosts an ASP application. I have a problem: when I try to test the ASP application from a computer on the same domain running IE6 on Windows 2000, the browser will not store the session key. Computers running other versions of Internet Explorer store the session key. When I host the application on a Windows 2000 server also on the local domain, the same test computer...
1
2997
by: Gary | last post by:
i have a project which is include ASP, VB, VB COM, MTS, IIS. when the user enter the site the user is asked to login using UserID and Password after that i am passing those values to COM Objects and those COM objects are setting the Session values through ASP intransic objects., if the user is a valid user then i am taking out his personal info including his accessLevel (integer field) and setting thoise values to session variables. ...
0
3231
by: joseph conrad | last post by:
Hi, I tried to implement my own session handler in order to keep control on the process the drawback I foun it is not creating and storing in my cookie the PHPSESSID variable anymore. reading te documentation it seems it should do it anyway any advice?
18
3432
by: BillE | last post by:
When a user opens a new IE browser window using File-New-Window the integrity of an application which relies on session state is COMPLETELY undermined. Anyone who overlooks the fact that File-New-Window creates an instance of IE in the same process with the same SessionID as the parent window is in big trouble. This fundamentally restricts the usefullness of using session state management. I probably missed it somewhere - can...
26
3596
by: BillE | last post by:
Some ASP.NET applications use Session Variables extensively to maintain state. These should be re-written to use viewstate, hidden fields, querystring, etc. instead. This is because if a user opens a new IE window with Ctrl-N or File-New-Window, BOTH WINDOWS SHARE THE SAME SESSION VARIABLES. This cannot be prevented.
25
6074
by: =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?= | last post by:
I tried: <sessionState timeout="1"> </sessionState> bounced IIS, and after 1 minute still had a session. ??? -- thanks - dave
0
8444
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8356
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8781
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8551
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8639
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6198
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4198
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2771
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
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.