Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Session not working after switching to Active_record_store

#2534

I just upgraded to rails 2.3.2 from rails 1.2.x and one of the issue was that I was getting an error of CookieOverflow.

Setup is Apache+Phusion+Rails 2.3.2+Mysql

So, I switched to active_record_store by uncommenting this line in enviroment.rb and creating sessions table -

config.action_controller.session_store = :active_record_store

sessions table - +------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------+--------------+------+-----+---------+----------------+ | id | int(11) | NO | PRI | NULL | auto_increment | | session_id | varchar(255) | NO | MUL | NULL | | | data | text | YES | | NULL | | | created_at | datetime | YES | | NULL | | | updated_at | datetime | YES | MUL | NULL | | +------------+--------------+------+-----+---------+----------------+ 5 rows in set (0.00 sec)

Now, I am trying to set various values in session like -

session[:affiliate_id] = _affilID

But this is not working.

No error message is generated either. When I try to do session.inspect, couple of variables are getting set -

{:guest_clicks_count=>1}

Any ideas where the issue is?

Any help will be greatly appreciated.

Regards, Rajat

Reported by rubynewbie · April 21st, 2009 @ 07:00 AM

State: duplicate
Milestone: 2.x
Assigned to: Ryan Bigg Ryan Bigg
Importance: none

Activity

  1. heidmo
    heidmo

    There is an issue with reset_session #2200 in active record store which may be causing a problem.

    April 21st, 2009 @ 08:41 PM

  2. Steve St. Martin
    Steve St. Martin
    • Assigned user set to Ryan Bigg

    duplicates #2200, mark as duplicate

    April 15th, 2010 @ 10:28 PM

  3. Ryan Bigg
    Ryan Bigg
    • State changed from new to duplicate

    April 15th, 2010 @ 11:02 PM