Welcome Guest, Not a member yet? Register   Sign In
Yet Another Session Issue
#8

[eluser]tmcintosh[/eluser]
@bastien31 - thanks for the input, I hope a real solution is made evident at some point. I have seen the 2 links that you mention, however neither are causes of my situation.

When I was using cookies, I tested the "-" issue in the cookie name and it did not help. Now that I'm using database for session management it's irrelevant. For the second link, the main issue there was AJAX calls generating a second session id. As far as I can tell, my site is not doing any async ajax calls.

Update************
• There were a few css links that were generating rewritten URL calls (ie. site.com/css/none) that I thought might be triggering a session start, but I eliminated them and it still continued

My solution:
------------------------------------
This is a total HACK solution but it is what I needed to do to move forward with my client.

Because my site was generating 2 session id's, 1 with user data and 1 without, I updated the Session Insert code to look for existing user_data based on the IP Address, and then copy it to the new session entry. That way when the site gets confused about which Session ID is really the current one, it won't kick the user out because of missing user_data in the session database record.

I realize this is not a great method, and that it is more susceptible to attacks and IP spoofing, but in my specific use case it may just be enough to put the issue to bed for now. The client is planning a full site rebuild in the not too distant future, and the site is not very large, so this HACK will have to do for now.

It doesn't however solve the underlying issue that the Session library for some reason is randomly losing $_SESSION data and then recreating a new second session id along with the first. Although I've achieved the end result with my hack, a real solution would be much better and would benefit others looking for one as well.






Messages In This Thread
Yet Another Session Issue - by El Forum - 09-09-2012, 02:45 PM
Yet Another Session Issue - by El Forum - 09-09-2012, 02:53 PM
Yet Another Session Issue - by El Forum - 09-09-2012, 02:56 PM
Yet Another Session Issue - by El Forum - 09-09-2012, 03:13 PM
Yet Another Session Issue - by El Forum - 09-09-2012, 04:36 PM
Yet Another Session Issue - by El Forum - 09-11-2012, 10:13 AM
Yet Another Session Issue - by El Forum - 09-11-2012, 10:19 AM
Yet Another Session Issue - by El Forum - 09-11-2012, 11:02 AM
Yet Another Session Issue - by El Forum - 09-12-2012, 03:20 AM
Yet Another Session Issue - by El Forum - 09-13-2012, 01:28 AM
Yet Another Session Issue - by El Forum - 09-13-2012, 01:35 AM
Yet Another Session Issue - by El Forum - 09-13-2012, 06:02 AM
Yet Another Session Issue - by El Forum - 09-13-2012, 06:14 AM
Yet Another Session Issue - by El Forum - 09-13-2012, 06:20 AM
Yet Another Session Issue - by El Forum - 09-13-2012, 06:34 AM
Yet Another Session Issue - by El Forum - 09-13-2012, 06:35 AM
Yet Another Session Issue - by El Forum - 09-17-2012, 01:38 AM



Theme © iAndrew 2016 - Forum software by © MyBB