hi all, i have had this problem for a while and so have been unable to use activerecord to store my sessions. shortly after login it get a ''string not matched'' exception and it looks like it is occuring during some ''flash'' methods. i was under the impression that this used to occur when your session was too large so i have reduced my session values to just id''s (rather than storing entire objects) to reduce their size. it still happens. i would really like to get my sessions in the database. has anyone else had trouble with this. i have the following specs: mysql 4.1.15 rails 0.14.2.2752 activerecord 1.12.2.2752 using webrick thanks heaps, -felix
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Nov 14, 2005, at 5:16 PM, Felix McCoey wrote:> i have had this problem for a while and so have been unable to use > activerecord to store my sessions. > > shortly after login it get a ''string not matched'' exception and it > looks > like it is occuring during some ''flash'' methods. i was under the > impression that this used to occur when your session was too large > so i > have reduced my session values to just id''s (rather than storing > entire > objects) to reduce their size. it still happens. > > i would really like to get my sessions in the database. has anyone > else > had trouble with this. > > i have the following specs: > > mysql 4.1.15 > rails 0.14.2.2752 > activerecord 1.12.2.2752 > using webrick > > thanks heaps,Hi Felix, Are you on Windows, Linux, Mac, ? Are you using the mysql adapter that comes with Rails, or did you upgrade to the C bindings (gem install mysql)? Does the problem occur outside of webrick? Thanks! jeremy -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (Darwin) iD8DBQFDedSYAQHALep9HFYRAs5YAJsHb30+5Jvn5HSuXuSfROrpOrt0wgCeKTY3 LG0373dAyh68WcdQSQbPYRs=WJvU -----END PGP SIGNATURE-----
This problem *sounds* like an issue we''ve seen where using ActiveRecord-backed session stores under development mode suddenly reverts back to PStore sessions after a few accesses. FYI, we''ve seen this on Rails 0.13.1, using the SQLServer adapter in ODBC mode, with Webrick. Are you seeing ''pstore'' in your error messages at all? If so, basically it seems like the session-store configuration gets lost in all the reloading jazz (it works fine in production, we''ve seen). I wish I could give you a solution... - james On 11/15/05, Jeremy Kemper <jeremy-w7CzD/W5Ocjk1uMJSBkQmQ@public.gmane.org> wrote:> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Nov 14, 2005, at 5:16 PM, Felix McCoey wrote: > > i have had this problem for a while and so have been unable to use > > activerecord to store my sessions. > > > > shortly after login it get a ''string not matched'' exception and it > > looks > > like it is occuring during some ''flash'' methods. i was under the > > impression that this used to occur when your session was too large > > so i > > have reduced my session values to just id''s (rather than storing > > entire > > objects) to reduce their size. it still happens. > > > > i would really like to get my sessions in the database. has anyone > > else > > had trouble with this. > > > > i have the following specs: > > > > mysql 4.1.15 > > rails 0.14.2.2752 > > activerecord 1.12.2.2752 > > using webrick > > > > thanks heaps, > > Hi Felix, > > Are you on Windows, Linux, Mac, ? > > Are you using the mysql adapter that comes with Rails, or did you > upgrade to the C bindings (gem install mysql)? > > Does the problem occur outside of webrick? > > Thanks! > jeremy > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.2 (Darwin) > > iD8DBQFDedSYAQHALep9HFYRAs5YAJsHb30+5Jvn5HSuXuSfROrpOrt0wgCeKTY3 > LG0373dAyh68WcdQSQbPYRs> =WJvU > -----END PGP SIGNATURE----- > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Jeremy Kemper wrote: > Are you on Windows, Linux, Mac, ?> > Are you using the mysql adapter that comes with Rails, or did you > upgrade to the C bindings (gem install mysql)?i am currently on linux using the mysql adapter that comes with rails. i will try the gem one and report> Does the problem occur outside of webrick?yes, it has happened with lighttpd and apache2 and just using irb so i don''t think that is an issue. -felix
James Adam wrote:> This problem *sounds* like an issue we''ve seen where using > ActiveRecord-backed session stores under development mode suddenly > reverts back to PStore sessions after a few accesses. FYI, we''ve seen > this on Rails 0.13.1, using the SQLServer adapter in ODBC mode, with > Webrick. > > Are you seeing ''pstore'' in your error messages at all? If so, > basically it seems like the session-store configuration gets lost in > all the reloading jazz (it works fine in production, we''ve seen).yes, i get the following in the trace: #{RAILS_ROOT}usr/lib/ruby/1.8/cgi/session/pstore.rb:25:in `[]='' #{RAILS_ROOT}usr/lib/ruby/1.8/cgi/session/pstore.rb:25:in `[]='' #{RAILS_ROOT}usr/lib/ruby/gems/1.8/gems/actionpack-1.10.2.2752/lib/action_controller/flash.rb:141:in `flash'' #{RAILS_ROOT}usr/lib/ruby/gems/1.8/gems/actionpack-1.10.2.2752/lib/action_controller/flash.rb:154:in `fire_flash'' now if it works in a production environment and not development then that is great, just make testing all my session accessing function a little trickier. does anyone actually know what is causing it?> I wish I could give you a solution...pity, but thanks -felix
Oops! I''ve been bitten by this very often in development, and *also* in production. I''ve seen this on Windows+Webrick, Windows+Apache2+FCGI, Debian+Apache2+FCGI (all Mysql) Everything went OK on my Typo-based commerce app, untill I added a cart object to be stored in the session. Since then, this problem periodicaly shows up. I''m now desperatly looking for a fix to this issue, and can provide more environment data if needed. ERic On 11/16/05, Felix McCoey <felix.mccoey-8PZlF8N9LqR+XZJcv9eMoEEOCMrvLtNR@public.gmane.org> wrote:> > James Adam wrote: > > This problem *sounds* like an issue we''ve seen where using > > ActiveRecord-backed session stores under development mode suddenly > > reverts back to PStore sessions after a few accesses. FYI, we''ve seen > > this on Rails 0.13.1, using the SQLServer adapter in ODBC mode, with > > Webrick. > > > > Are you seeing ''pstore'' in your error messages at all? If so, > > basically it seems like the session-store configuration gets lost in > > all the reloading jazz (it works fine in production, we''ve seen). > > yes, i get the following in the trace: > > #{RAILS_ROOT}usr/lib/ruby/1.8/cgi/session/pstore.rb:25:in `[]='' > #{RAILS_ROOT}usr/lib/ruby/1.8/cgi/session/pstore.rb:25:in `[]='' > #{RAILS_ROOT}usr/lib/ruby/gems/1.8/gems/actionpack-1.10.2.2752 > /lib/action_controller/flash.rb:141:in > `flash'' > #{RAILS_ROOT}usr/lib/ruby/gems/1.8/gems/actionpack-1.10.2.2752 > /lib/action_controller/flash.rb:154:in > `fire_flash'' > > now if it works in a production environment and not development then > that is great, just make testing all my session accessing function a > little trickier. > > does anyone actually know what is causing it? > > > I wish I could give you a solution... > > pity, but thanks > > -felix > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails