Welcome Guest, Not a member yet? Register   Sign In
Having a really odd problem with sessions.
#1

[eluser]code3r[/eluser]
I really can't figure this out it is so bizarre. I use Cloudflare's protection services to mask my ip. I have also installed a mod_cloudflare so that the incomming user ips are not masked. I am a bit of a beginner with Codeigniter so help would be so greatly appreciated!

Anyways heres my sessions configuration:
Code:
$config['sess_cookie_name']  = 'vmcsession';
$config['sess_expiration']  = 7200;
$config['sess_expire_on_close'] = FALSE;
$config['sess_encrypt_cookie'] = FALSE;
$config['sess_use_database'] = TRUE;
$config['sess_table_name']  = 'ci_sessions';
$config['sess_match_ip']  = TRUE;
$config['sess_match_useragent'] = FALSE;
$config['sess_time_to_update'] = 300;

When my Cloudflare protection is enabled, 3 sessions will be created therefor preventing my login script from working. These are all created when the login button is pressed.
[Image: 6557fbb21cbda33531ec33ef3e0bea29.png?1362628511]

However, when my domain is pointed directly to my server with no proxy ip, one session will be created and my login function works fine.

I can donate via paypal to someone who helps me solve this
#2

[eluser]Kyle Johnson[/eluser]
I've seen several sessions generated for one person as well.

It might be that the User Agent field is too short (update your ci_session.user_agent to varchar(200) or something similar)
#3

[eluser]CroNiX[/eluser]
@kyle that won't matter since internally it's only looking at the first x characters (forgot the number off the top of my head), but increasing the size in the db will have no affect unless you change it in the code as well.
#4

[eluser]code3r[/eluser]
I appreciate the replies. The script is working fine as long as the domain is pointed directly to the server. This is the part that makes no sense. I really need this problem fixed help is so greatly appreciated.
#5

[eluser]code3r[/eluser]
Bump. Please anybody I so badly need this.
#6

[eluser]Unknown[/eluser]
Hello,

I had the same problem and I solved it by using: https://github.com/EllisLab/CodeIgniter/...sion-Class

I don't know exactly what the explication is, but it works.




Theme © iAndrew 2016 - Forum software by © MyBB