Welcome Guest, Not a member yet? Register   Sign In
Session Match IP False No Working
#6

PHP Code:
'sess_match_ip'
|
Whether to match the user's IP address when reading the session data.
|
| WARNING: If you'
re using the database driverdon't forget to update
|         your session table'
s PRIMARY KEY when changing this setting.


For 
MySQL:

CREATE TABLE IF NOT EXISTS `ci_sessions` (
        `idvarchar(128NOT NULL,
        `ip_addressvarchar(45NOT NULL,
        `timestampint(10unsigned DEFAULT 0 NOT NULL,
        `datablob NOT NULL,
        KEY `ci_sessions_timestamp` (`timestamp`)
);



You will also need to add a PRIMARY KEY depending on your ‘sess_match_ip’ setting.
The examples below work both on MySQL and PostgreSQL:

// When sess_match_ip = TRUE
ALTER TABLE ci_sessions ADD PRIMARY KEY (idip_address);

// When sess_match_ip = FALSE
ALTER TABLE ci_sessions ADD PRIMARY KEY (id);

// To drop a previously created primary key (use when changing the setting)
ALTER TABLE ci_sessions DROP PRIMARY KEY
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
Session Match IP False No Working - by kft101 - 01-23-2023, 09:59 AM
RE: Session Match IP False No Working - by kft101 - 01-24-2023, 11:09 AM
RE: Session Match IP False No Working - by kft101 - 01-25-2023, 01:33 PM
RE: Session Match IP False No Working - by InsiteFX - 01-26-2023, 01:01 AM
RE: Session Match IP False No Working - by kft101 - 01-26-2023, 10:56 AM
RE: Session Match IP False No Working - by kenjis - 01-26-2023, 07:37 PM
RE: Session Match IP False No Working - by kft101 - 01-30-2023, 01:20 PM



Theme © iAndrew 2016 - Forum software by © MyBB