Welcome Guest, Not a member yet? Register   Sign In
session id has overwrite when i refresh sub-domain site
#1

[eluser]guzzilar[/eluser]
Hi ci forum
sorry my english language is not good...

-----
My site has 2 application in main-domain & sub-domain

application in sub-domain use CI version 1.7.2
and application in main-domain user CI version 2.1.0

and session is overwrite when i refresh in sub-domain and main-domain

I tested via

in sub.site.com & www.site.com
Code:
function test_sess()
{  
   echo $this->session->userdata('session_id');
}



in my config.php of sub.site.com
Code:
$config['encryption_key'] = 'my_';

$config['sess_cookie_name']  = 'ci_session';
$config['sess_expiration']  = 86400;
$config['sess_encrypt_cookie'] = FALSE;
$config['sess_use_database'] = FALSE;
$config['sess_table_name']  = 'ci_sessions';
$config['sess_match_ip']  = FALSE;
$config['sess_match_useragent'] = TRUE;
$config['sess_time_to_update'] = 86400;

$config['cookie_prefix'] = "";
$config['cookie_domain'] = ".site.com";
$config['cookie_path']  = "/";

and config.php in site.com
Code:
$config['encryption_key'] = 'my_';

$config['sess_cookie_name']  = 'ci_session';
$config['sess_expiration']  = 86400;
$config['sess_expire_on_close'] = TRUE;
$config['sess_encrypt_cookie'] = FALSE;
$config['sess_use_database'] = FALSE;
$config['sess_table_name']  = 'ci_sessions';
$config['sess_match_ip']  = FALSE;
$config['sess_match_useragent'] = TRUE;
$config['sess_time_to_update'] = 86400;

$config['cookie_prefix'] = "";
$config['cookie_domain'] = ".chip.in.th";
$config['cookie_path']  = "/";
$config['cookie_secure'] = FALSE;

Sorry but help me please , I want to fix session_id in 2 site (sub.site.com ,www.site.com) for check login session in database

Thank.


Messages In This Thread
session id has overwrite when i refresh sub-domain site - by El Forum - 07-12-2012, 03:30 AM
session id has overwrite when i refresh sub-domain site - by El Forum - 07-12-2012, 03:38 AM
session id has overwrite when i refresh sub-domain site - by El Forum - 07-12-2012, 03:51 AM
session id has overwrite when i refresh sub-domain site - by El Forum - 07-12-2012, 06:14 AM
session id has overwrite when i refresh sub-domain site - by El Forum - 07-12-2012, 06:38 AM
session id has overwrite when i refresh sub-domain site - by El Forum - 07-12-2012, 06:52 AM
session id has overwrite when i refresh sub-domain site - by El Forum - 07-12-2012, 07:44 AM



Theme © iAndrew 2016 - Forum software by © MyBB