• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
please help with sess_expiration

#1
hi

in CI2 i used to set  >>  sess_expiration = 0

The number of seconds you would like the session to last. The default value is 2 hours (7200 seconds). If you would like a non-expiring session set the value to zero: 0

but now in CI 3

The number of seconds you would like the session to last. If you would like a non-expiring session (until browser is closed) set the value to zero: 0


what if i want the session not expired at all ? i want it renewable and non-expiring .

please help me with this
Reply

#2
There's no such thing as a "non-expiring" with sessions (cookies) ... You may set the expiry time to be a thousand years, but technically - it still has to expire at some point.
Reply

#3
(04-22-2015, 04:58 AM)Narf Wrote: There's no such thing as a "non-expiring" with sessions (cookies) ... You may set the expiry time to be a thousand years, but technically - it still has to expire at some point.

Why no such thing ? How was it done before ?
Reply

#4
(04-23-2015, 03:31 AM)khashabawy Wrote: Why no such thing ?

Becase, as I said - no such thing exists.

(04-23-2015, 03:31 AM)khashabawy Wrote: How was it done before ?

It hasn't been done. When you set 'sess_expiration' to 0 in CI2, you just had a cookie with an expiry time of 730 days.
Reply

#5
I use this config :


PHP Code:
$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 60*60*24*365// full year
$config['sess_save_path'] = APPPATH ."storage/sessions";
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;

$config['cookie_prefix']    = 'dsa3s_';
$config['cookie_domain']    = '';
$config['cookie_path']        = '/';
$config['cookie_secure']    = FALSE;
$config['cookie_httponly']     = TRUE;

$config['standardize_newlines'] = TRUE;

$config['global_xss_filtering'] = TRUE;


$config['csrf_protection'] = TRUE;
$config['csrf_token_name'] = 'csrf_token';
$config['csrf_cookie_name'] = 'csrf_cookie_name';
$config['csrf_expire'] = 7200;
$config['csrf_regenerate'] = FALSE;
$config['csrf_exclude_uris'] = array(); 

although i am required to login every day Sad

any help ?
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.