Welcome Guest, Not a member yet? Register   Sign In
Session size for concurrent users
#3

The session data is always stored serverside. A cookie is data stored in the client side. When you use a session in PHP a small cookie is created (a session id token). That way the session id is stored clientside and PHP makes the connection between the user (based on the session id) and all the data inside the session (stored on server).

The SQL that is used to create the table that stores the sessions:

Code:
CREATE TABLE IF NOT EXISTS  `ci_sessions` (
    session_id varchar(40) DEFAULT '0' NOT NULL,
    ip_address varchar(45) DEFAULT '0' NOT NULL,
    user_agent varchar(120) NOT NULL,
    last_activity int(10) unsigned DEFAULT 0 NOT NULL,
    user_data text NOT NULL,
    PRIMARY KEY (session_id),
    KEY `last_activity_idx` (`last_activity`)
);

The data itself is stored as a TEXT field which can hold 64 Kilobytes. The 4K you refer to is the max size of a cookie (all cookies for a domain are counted together).
Reply


Messages In This Thread
Session size for concurrent users - by pb.sajjad - 12-01-2015, 05:29 PM
RE: Session size for concurrent users - by Diederik - 12-07-2015, 01:13 AM
RE: Session size for concurrent users - by Narf - 12-07-2015, 04:19 AM
RE: Session size for concurrent users - by Narf - 12-27-2015, 04:56 AM



Theme © iAndrew 2016 - Forum software by © MyBB