Welcome Guest, Not a member yet? Register   Sign In
Session creates new session id on every page load
#47

[eluser]Unknown[/eluser]
Thanks for all the troubleshooting tips. Unfortunately, I haven't found the right one yet.

Here's my variation of the issue:

On my development server (MAMP), I had database sessions set up and running fine. When I moved to the company's testing server (IIS 6, PHP, MSSQL) things didn't work quite as well. A session record would be created when the user logged in (and all their session information would be set), then when they were redirected to the landing page, the server would create a new (empty) session for them and destroy the old one. I could then refresh the landing page and that same cookie would persist.

To narrow the potential issues, I set the config to the simplest setup, just storing info in cookies instead of using the database:
Code:
$config['sess_cookie_name'] = 'cisession';
$config['sess_expiration'] = 7200;
$config['sess_expire_on_close'] = FALSE;
$config['sess_encrypt_cookie'] = FALSE;
$config['sess_use_database'] = FALSE;
$config['sess_table_name'] = '';
$config['sess_match_ip'] = FALSE;
$config['sess_match_useragent'] = FALSE;
$config['sess_time_to_update'] = 300;

Here's the detailed information:
1.User arrives at the site, and is sent to the "auth" controller to log in. A session and cookie are created
2. User submits name and password to auth/validate_credentials. Per firebug, that cookie is sent back to the server. The server authenticates the user and sends a cookie in response with the same session id, but the new userdata added as well.
3. The user is then redirected to site/home, sending that same cookie back to the server. The server discards that cookie and responds with a new one (with new session_id, also losing all userdata).
4.If I refresh this page (manually preventing a redirect because the user is not logged in) the empty session is not overwritten.

I can see in the cookies that the expiration is fine, and host and path are correct.

What to try next?





Messages In This Thread
Session creates new session id on every page load - by El Forum - 07-17-2010, 01:32 PM
Session creates new session id on every page load - by El Forum - 07-18-2010, 12:55 AM
Session creates new session id on every page load - by El Forum - 07-18-2010, 11:58 AM
Session creates new session id on every page load - by El Forum - 07-18-2010, 12:23 PM
Session creates new session id on every page load - by El Forum - 07-18-2010, 12:25 PM
Session creates new session id on every page load - by El Forum - 07-18-2010, 12:51 PM
Session creates new session id on every page load - by El Forum - 07-18-2010, 03:18 PM
Session creates new session id on every page load - by El Forum - 07-18-2010, 03:23 PM
Session creates new session id on every page load - by El Forum - 07-25-2010, 07:20 PM
Session creates new session id on every page load - by El Forum - 07-25-2010, 08:18 PM
Session creates new session id on every page load - by El Forum - 07-25-2010, 08:53 PM
Session creates new session id on every page load - by El Forum - 07-25-2010, 09:31 PM
Session creates new session id on every page load - by El Forum - 07-26-2010, 05:51 AM
Session creates new session id on every page load - by El Forum - 07-26-2010, 12:22 PM
Session creates new session id on every page load - by El Forum - 07-27-2010, 08:54 AM
Session creates new session id on every page load - by El Forum - 07-27-2010, 09:09 AM
Session creates new session id on every page load - by El Forum - 07-27-2010, 09:16 AM
Session creates new session id on every page load - by El Forum - 07-27-2010, 09:26 AM
Session creates new session id on every page load - by El Forum - 07-27-2010, 09:54 AM
Session creates new session id on every page load - by El Forum - 07-27-2010, 10:35 AM
Session creates new session id on every page load - by El Forum - 07-27-2010, 11:08 AM
Session creates new session id on every page load - by El Forum - 07-27-2010, 02:43 PM
Session creates new session id on every page load - by El Forum - 07-27-2010, 02:47 PM
Session creates new session id on every page load - by El Forum - 07-28-2010, 04:57 PM
Session creates new session id on every page load - by El Forum - 07-28-2010, 05:01 PM
Session creates new session id on every page load - by El Forum - 07-29-2010, 12:41 AM
Session creates new session id on every page load - by El Forum - 10-13-2010, 04:19 PM
Session creates new session id on every page load - by El Forum - 10-13-2010, 04:37 PM
Session creates new session id on every page load - by El Forum - 10-14-2010, 12:35 AM
Session creates new session id on every page load - by El Forum - 10-14-2010, 02:30 AM
Session creates new session id on every page load - by El Forum - 10-14-2010, 02:40 AM
Session creates new session id on every page load - by El Forum - 10-14-2010, 06:41 AM
Session creates new session id on every page load - by El Forum - 10-14-2010, 07:22 AM
Session creates new session id on every page load - by El Forum - 10-14-2010, 07:45 AM
Session creates new session id on every page load - by El Forum - 10-14-2010, 08:05 AM
Session creates new session id on every page load - by El Forum - 05-26-2011, 05:51 PM
Session creates new session id on every page load - by El Forum - 08-09-2011, 11:37 AM
Session creates new session id on every page load - by El Forum - 08-11-2011, 06:40 PM
Session creates new session id on every page load - by El Forum - 08-13-2011, 08:08 PM
Session creates new session id on every page load - by El Forum - 08-15-2011, 03:02 AM
Session creates new session id on every page load - by El Forum - 02-03-2012, 12:21 PM
Session creates new session id on every page load - by El Forum - 02-03-2012, 05:32 PM
Session creates new session id on every page load - by El Forum - 02-03-2012, 05:40 PM
Session creates new session id on every page load - by El Forum - 02-16-2012, 01:47 PM
Session creates new session id on every page load - by El Forum - 02-24-2012, 10:32 AM
Session creates new session id on every page load - by El Forum - 03-16-2012, 06:57 AM
Session creates new session id on every page load - by El Forum - 04-11-2012, 02:49 PM
Session creates new session id on every page load - by El Forum - 06-05-2012, 04:45 PM
Session creates new session id on every page load - by El Forum - 06-05-2012, 05:14 PM
Session creates new session id on every page load - by El Forum - 06-05-2012, 07:31 PM
Session creates new session id on every page load - by El Forum - 06-06-2012, 11:26 AM
Session creates new session id on every page load - by El Forum - 06-06-2012, 11:38 AM
Session creates new session id on every page load - by El Forum - 06-06-2012, 11:48 AM
Session creates new session id on every page load - by El Forum - 06-10-2012, 11:43 AM
Session creates new session id on every page load - by El Forum - 06-22-2012, 01:26 AM
Session creates new session id on every page load - by El Forum - 06-22-2012, 02:00 AM
Session creates new session id on every page load - by El Forum - 06-22-2012, 03:58 AM
Session creates new session id on every page load - by El Forum - 07-06-2012, 10:30 AM
Session creates new session id on every page load - by El Forum - 10-19-2012, 12:23 PM
Session creates new session id on every page load - by El Forum - 11-23-2012, 05:01 AM
Session creates new session id on every page load - by El Forum - 04-03-2013, 02:30 PM
Session creates new session id on every page load - by El Forum - 04-04-2013, 01:36 PM
Session creates new session id on every page load - by El Forum - 04-22-2013, 11:16 AM
Session creates new session id on every page load - by El Forum - 04-22-2013, 12:40 PM
Session creates new session id on every page load - by El Forum - 04-22-2013, 01:52 PM
Session creates new session id on every page load - by El Forum - 04-23-2013, 05:25 AM
Session creates new session id on every page load - by El Forum - 08-21-2013, 11:20 AM
Session creates new session id on every page load - by El Forum - 08-22-2013, 12:05 AM
Session creates new session id on every page load - by El Forum - 08-25-2013, 03:40 AM
Session creates new session id on every page load - by El Forum - 12-18-2013, 07:08 AM



Theme © iAndrew 2016 - Forum software by © MyBB