Arshad :: A Fast Learner’s Blog

May 24, 2008

Where session actually be saved, client browser or server?

Filed under: Uncategorized — rshad @ 7:33 pm
Tags: ,

Session is the most widely used PHP feature which is being used for security purpose. From beginner to expert, almost all coder feel comfort using session as for its wonderful feature (preserving data across subsequent accesses) .
But question is, where actually session data be saved? In client browser URL or in browser cookie? Or, in server?

First and simple answer is – session born in server and lives browser’s cookie. If cookie is not enabled, it parses to browser URL as variable (serialized).

Now, how can server remember the huge number of variables that is registered with session? Specially when PHP is installed as CGI wrapper, as PHP interpreter is created and destroyed for every page request.

Yes, server needs to save those data in its physical memory too.
Session creates a file to save its information at the location assigned by session_save_path() function or set by session.save_path option.

So, at the final sentence, we can say that session uses both site memory – server side (physical file in session_save_path location) and client side (physical file cookie) or in URL as a variable.

May 7, 2008

Sorry, I have changed my regular blog site

Filed under: Uncategorized — rshad @ 11:59 am

Sorry to say, I am not using this blog anymore, I have changed my blog address and that is arshadinfo.wordpress.com and arshadinfo.blogspot.com.

Thanks

Arshad

July 18, 2006

Welcome to my blog

Filed under: Uncategorized — rshad @ 7:03 am

Hello everybody,

Thank you very much to visit my blog. I am testing all features of WordPress.com blogging system. Soon I am going to add my all blogs and a breif in introduction about me. Till then please wait.

Blog at WordPress.com.