tags:

views:

42

answers:

5

Hi all,

Where will be the session value will be store in PHP.

For example, cookies will be stored in browser as well as where will be the session value will be store.

thanks in advance...

+1  A: 

Under /tmp in a plain text file on Unix like environments.

Novikov
+4  A: 

By default the session values are stored on the filesystem under the PHP directory (on windows at least). You can find the default session location by using the session_save_path function.

You can write your own session handlers to persist session data elsewhere, such as to a database. Look at the session_set_save_handler function for more information.

Neil Aitken
A: 

It is set at php.ini as session.save_path

Its default is /tmp but you can change it

marvin
A: 

You are able to set the save path yourself using session_save_path.

Thariama
+1  A: 

In PHP, the session values are stored in the server. PHP sessions store only an ID cookie on the user's system which is used to reference the session file on the server. As such, the user has no access to the content of the session file, thereby providing a secure alternative to cookies.
PHP sessions also work when the user has disabled the browser's cookie support. In this situation it includes the session ID information in the web page URLs.

You can also find some more concepts in the PHP Manual Site.
Another very good knowledge about session is given in this PDF file, which tells about the Session Fixation Vulnerability in Web-based Applications.

Hope it helps.

Knowledge Craving