Welcome Guest, Not a member yet? Register   Sign In
Custom Session With Memcache, Anti Bots not working with Subdomain
#1

[eluser]Unknown[/eluser]
Hi all,

I created a MY_Session library to support Memcache as session storage and kicking out bots denying them sessions. Most of the code was derived from CI_Session class. However when I tried to do a multisubdomain login, it keeps creating new sessions id's.

For instance if I logged in at www.domain.com and then opening up sub.domain.com, it created a new session destroying the session I got from www.domain.com. The same thing happens vice versa.

Here are my config codes:
Code:
$config['sess_cookie_name']             = 'urbanesiav1';
$config['sess_expiration']              = 60 * 60 * 24 * 14;
$config['sess_encrypt_cookie']  = TRUE;
$config['sess_use_database']    = TRUE;
$config['sess_table_name']              = 'ci__sessions';
$config['sess_match_ip']                = FALSE;
$config['sess_match_useragent'] = TRUE;
$config['sess_time_to_update']          = 60 * 60 * 4;
$config['cookie_prefix']        = "";
$config['cookie_domain']        = ".urbanesia.com";
$config['cookie_path']          = "/";

The MY_Session library is attached with this post. I wanted to show the codes but the character count does not allow me to do so.

Any kind of help is appreciated, thank you beforehand.




Theme © iAndrew 2016 - Forum software by © MyBB