[eluser]ccontreras[/eluser]
[quote author="niranjnn01" date="1323483005"]I solved the problem too, and the world suddenly seems to be a better place to live in!!!
I tired all the above said ways to solve, But no single solution solved my problem. a number of them did.
I noticed that the session was destroyed at the following part of the session library
Code:
// Decrypt the cookie data
if ($this->sess_encrypt_cookie == TRUE)
{
$session = $this->CI->encrypt->decode($session);
}
else
{
// encryption was not used, so we need to check the md5 hash
$hash = substr($session, strlen($session)-32); // get last 32 chars
$session = substr($session, 0, strlen($session)-32);
// Does the md5 hash match? This is to prevent manipulation of session data in userspace
if ($hash !== md5($session.$this->encryption_key))
{
log_message('error', 'The session cookie data did not match what was expected. This could be a possible hacking attempt.');
$this->sess_destroy();
return FALSE;
}
}
so i used this in the config
Code:
$config['sess_encrypt_cookie'] = TRUE;
$config['cookie_domain'] = "mydomainname.com"; // IMPORTANT!! - DID NOT WORK WITHOUT THIS BEING SET - FOR ME
Strangely enough, the code was working perfectly well without any of these problems/fixes in my local(wamp in windows 7). My server is Linux.
Thank you everyone who contributed!![/quote]
Thanks bro, this worked pretty good for me!!!