473,406 Members | 2,404 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,406 software developers and data experts.

session id is determined by the cookie?

When we open a new web browser, all the windows that are open from that
web browser belong to the same session. However, if we open a new web
browser, then it will be different sessions. Is that the correct
concept?

Another question is if session id is generated by the web server?
Session ID is determined by the cookies? Otherwise, how can the web
server know this is new session, or old session?

Jul 17 '05 #1
5 3436
jr********@hotmail.com wrote:

FUP to comp.lang.php (and there is generally no reason to crosspost
between clj.help and clj.programmer).
When we open a new web browser, all the windows that are open from that
web browser belong to the same session. However, if we open a new web
browser, then it will be different sessions. Is that the correct
concept?
No, depends on browser and how the new "windows" get opened.
Another question is if session id is generated by the web server?
Atleast for PHP the client can set the sessionID.
Session ID is determined by the cookies?
Could be. Depends on server configuration.
Otherwise, how can the web server know this is new session, or old
session?


The webserver doesn't care (atleast with PHP), if you actually care you
have to write your own code to do sessionID generation and checking.

Jul 17 '05 #2
1) no, that's wrong. everything would be saved to ur pc. just like a
cookie

2) session is saved to local pc as the cookies

Jul 17 '05 #3
newB wrote:
1) no, that's wrong. everything would be saved to ur pc. just like a
cookie

2) session is saved to local pc as the cookies


No and no. http://in2.php.net/session

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Jul 17 '05 #4
jr********@hotmail.com wrote:
When we open a new web browser, all the windows that are open from that web browser belong to the same session.
Yes. This happens as the browser will send current session id (from
cookie or query string) to the server--and the state is maintained.
However, if we open a new web
browser, then it will be different sessions. Is that the correct
concept?
Mostly, but it depends on the settings (php.ini)--PHP's default
setting uses non-persistent session cookies and so it happens. But, if
you configure it to use persistent session cookie (persistent
cookie==cookie with life time not equal to zero) and if the client
sends cookie to server, the session might be same.
Another question is if session id is generated by the web server?
Session ID is determined by the cookies?
PHP's session management is "permissive"--which means if you send a
session id to server (using cookies or query string) it will try to use
("use" here means starting new session or resuming session) your
session id. This is the main cause for session hijacking.
Otherwise, how can the web
server know this is new session, or old session?


That depends on session.gc_maxlifetime setting. After this
session.gc_maxlifetime time, session will be seen as garbage or
expired.

p.s.: For your questions, everything depends on the php.ini settings
<http://in2.php.net/session>

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Jul 17 '05 #5
session is not belongs to the web browser...when the first time a
request come from a user to a server the sever automitacally give hime
a session.. what ever the browser the user is use.
u can check this by copyeing the url and paste it in another browser after a successfulyy login-- u see that all the autheticate page you
are browsing

cockies is used by some of the web hoster to track u .to find that u r
browsing their site for the first time or for the seccond time . when
basically we check on save pass check box this is save in our hard disk
as cockie. so seccond time when we logon to that particuler site that
cockie is send user name and password for us.u can check this by opening cockie folder what is under document and

settings E:\Documents and Settings\UR_USER_NAME\Cookies folder and if u
delete a cockie what may e set for yahoo or hotmail so nexttime when u
going to logon their pages the auto loging system will not work

HTTP protocols are stateless, so one state dont know about other state.
session id is nedded to be handeld by server side scipting .usually it
is handeld by programer. so it is basically our responsibility to play
with a session, check it in every pages.. send it to one page to other
u can do that in many when like by checking when u give him the id
their is many way u can handel a id, like for a page-the id will valid
only in a page in a whole session or for some default timing.
if in ur websites theire is no securitu like no user name and login
system then u can easily forget aout this session and cockie things
bye
take care

Jul 17 '05 #6

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

Similar topics

3
by: Pete | last post by:
I have a site which is using sessions to pass data from one page through to the next. The problem that I have is that there are only two places where the session could/should be destroyed. This...
27
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...
6
by: bonehead | last post by:
I'm still a novice when it comes to session security issues. The problems I'm trying to solve may be fairly common, but I haven't seen examples of solutions in any of the books I've looked at. I...
1
by: mudge | last post by:
I'm running PHP Version 4.3.10. I'm trying to make it so that when a person logs in using a user name and password that their session is valid and continues for a few months so they don't have to...
2
by: Alex | last post by:
Thank you in advance. My ASP page 1 redirect user to third party's website, after the process at third party is finished, in 3rd party's page, there is one link to route user back to my...
7
by: ehendrikd | last post by:
hi all i need some clarification on how the php session work in relation to cookies. we have a web site where users need to log in. a few of our users were having troubles with their browser...
5
by: Åženol Akbulak | last post by:
Hello; I use in my web application FormsAuthentication. Also I use Session state (InProc). When a user logged in, I can read Session parameters. (For example Session). Problem is that, when...
4
by: rgparkins | last post by:
Hello I am running out of time with a problem I have running PHP 5.04 and Apache 2.0 and really need help :(. I have a page that stores a variable in session but each time I reload that page the...
2
by: Gordon Burditt | last post by:
I had this idea about preventing session fixation, and I'm wondering what anyone else thinks about it. The idea is, essentially, don't allow session ids that YOUR PHP didn't generate (and aren't...
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...
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...
0
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,...
0
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...
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
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...

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.