Welcome Guest, Not a member yet? Register   Sign In
Sessions not saved when changing page
#4

[eluser]InsiteFX[/eluser]
You also need to update the database session table the one in the documentation is incorrect!
They changed the size of the user_agent field...
Code:
-- --------------------------------------------------------------

--
-- Table structure for CodeIgniter ci_sessions.
--
DROP TABLE IF EXISTS `ci_sessions`;

CREATE TABLE IF NOT EXISTS  `ci_sessions` (
  `session_id`    varchar(40)           DEFAULT '0' NOT NULL,
  `ip_address`    varchar(16)           DEFAULT '0' NOT NULL,
  `user_agent`    varchar(120)                      NOT NULL,
  `last_activity` int(10)      unsigned DEFAULT 0   NOT NULL,
  `user_data`     text,
  PRIMARY KEY (session_id)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ;

-- -------------------------------------------------------------
--  `user_data`    text,        COMMENT - maximum length of 65535 characters.
--  `user_data`    mediumtext,  COMMENT - maximum length of 16777215 characters.
--  `user_data`    longtext,    COMMENT - maximum length of 4294967295 characters.

What happens is if the table is not updated it will lose the session because the user_agent will not match.

InsiteFX


Messages In This Thread
Sessions not saved when changing page - by El Forum - 05-11-2011, 04:05 PM
Sessions not saved when changing page - by El Forum - 05-11-2011, 04:33 PM
Sessions not saved when changing page - by El Forum - 05-11-2011, 09:27 PM
Sessions not saved when changing page - by El Forum - 05-12-2011, 04:54 AM
Sessions not saved when changing page - by El Forum - 05-12-2011, 08:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB