[RESOLVED] Concept of SESSION management
Hi guys...:wave:
I didn't get the idea of session management...
I mean where does the session data will be stored for the client side ?
Explanation: When user logins successfully, a new session will be started. Then the session data is either entered into a database or to the SESSION array. That is in server side.
But what does this client side do ? Stores the sessionid in cookies ? :confused:
Thanks....:wave:
Re: Concept of SESSION management
i'm not quite sure about this either, but this might explain something..
i believe as long as the browser is open, there is a connection between the server and the client, as soon as the client closes, the session and connection is terminated.
http://forums.devnetwork.net/viewtopic.php?f=34&t=88006
Re: Concept of SESSION management
Quote:
Originally Posted by
Justa Lol
i believe as long as the browser is open, there is a connection between the server and the client, as soon as the client closes, the session and connection is terminated.
Yes, because the session identifier is a cookie with an expiration of the browser session.
Of course a browser can choose to keep the cookie longer, but mainstream browsers don't do this.
But if cookies are not supported, you need to work on a system that transfers the session identifier along the pages with POST or GET.
In case you are wondering, serverside, the session data by default is stored in files in the 'tmp' directory.
This can pose a security issue on shared webhosting, but unless you're dealing with confidential data it's not a hole worth plugging.
http://phpsec.org/projects/guide/5.html
Re: Concept of SESSION management
Thanks guys...:wave:
So, when we store the sessions details in the SESSION variable, will it be automatically passed to the client or we have to do this explicitly to manage the session ?
Re: Concept of SESSION management
Session data never is passed to the client. Only it's identifier.
Re: Concept of SESSION management
Quote:
Originally Posted by
TheBigB
Session data never is passed to the client. Only it's identifier.
Ok.. Thanks...:wave: