PHP Session

Where does the session stored, either client side or server side?

Questions by rathodvg3   answers by rathodvg3

Showing Answers 1 - 70 of 70 Answers

sandeshk

  • May 15th, 2009
 

Sessions are like server-side cookie files that store variables that can be read from, or written to, by PHP scripts.
Each session file is unique to the user request that created it and can only be accessed by subsequent requests from the same user.

  Was this answer useful?  Yes

akaash19

  • Jun 11th, 2009
 

Sessions are stored on the server side and session ID and name is stored on the client side in cookie(assuming that browser accepts cookie).

  Was this answer useful?  Yes

seanmullins

  • Jul 15th, 2010
 

The Session data is stored on the Server, typically on the filesystem, but can be in memory or in a DB.
The session_id (used to associate a client with the correct session) is usually stored in a cookie on the client, or, if cookies are turned off, by url rewriting.

  Was this answer useful?  Yes

mayur_007

  • Sep 28th, 2010
 

Session are stored on server in the tmp directory by default. If PHP script uses any custom session handler using set_session_handler() function to store session in database then it will store in the database.

How it works:
when the script uses session_start() function, server create the unique session id with PHPSESSID,name and MD5 encryption which is defined in php.ini.

this PHPSESSID is sent via header to the browser.

when browser send requests to server the unique seesion id is added in the header and server read this session id to check the request.

  Was this answer useful?  Yes

abc

  • Sep 12th, 2011
 

session used to transfer the data & data stored on web server

  Was this answer useful?  Yes


--> Session store information about page,

--> Its Server Side Storage

--> Server Is Always Temporary

--> Its Prevent stateless which occur by http protocol in web-site

--> If we want to use session then we have to first start session using session_start() function

  Was this answer useful?  Yes

kundan

  • Sep 28th, 2011
 

on client side

  Was this answer useful?  Yes

BABU

  • Oct 29th, 2011
 

Session values are normally stored on a cookie file.Default cookie file is PHPSESID.This cookie file is stored on a client system.

  Was this answer useful?  Yes

Motta Valerio

  • Oct 22nd, 2012
 

The better way is store the sessions server side on database or, if you need high performance loosing scalability, on RAM.

  Was this answer useful?  Yes

Mukesh

  • Sep 17th, 2015
 

Session are stored in Server side. Session are secure.

  Was this answer useful?  Yes

Abinash Kumar

  • Jun 20th, 2017
 

The session is stored on the client side.

  Was this answer useful?  Yes

sagar

  • Jan 5th, 2018
 

Session stored on server side and cookies stored on client side.
session start using session_start(); method and destroy using session_destroy(); method

  Was this answer useful?  Yes

PRASHANT PRAKASH WADIKAR

  • Mar 8th, 2018
 

Session stored on server side

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions