Unni
2007-Nov-12 02:36 UTC
Session not working - new session being created for each request
I stored data in ''session'' , but the next request from the same machine and browser is not able to access that info. cookies is turned on in my browser.(im using IE6). I''m using database for session storage. i noticed that a new session is being created for each request that comes from the browser. this should be the reason why im not able to retrieve my data, in the next request. But y so? why a new session is being vreated for every request from the same browser, same machine, same domain? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Abhi Manyu
2007-Nov-12 03:36 UTC
Re: Session not working - new session being created for each
may be everytime when you run the code the control flow is coming to session initialization. try using breakpoint and check -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jeff Pritchard
2007-Nov-12 16:13 UTC
Re: Session not working - new session being created for each
Unni wrote:> > But y so? why a new session is being vreated for every request from > the same browser, same machine, same domain?Any chance there is a call to "reset_session" in your code? That would do it if that is getting hit each time. Also, somewhat along a similar line, the user authentication plugins call reset_session where needed. If you are using one of them and calling the wrong method at the wrong time you might be hitting that call to reset_session. jp -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Serkan Serkan
2007-Nov-12 17:59 UTC
Re: Session not working - new session being created for each
Im having the same problem. Every page refresh creates a new session. Any help would be greatly appreciated! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
i tried grepping my entire project for ''reset_session'' . i haven''t used it anywhere. On Nov 12, 9:13 pm, Jeff Pritchard <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Unni wrote: > > > But y so? why a new session is being vreated for every request from > > the same browser, same machine, same domain? > > Any chance there is a call to "reset_session" in your code? That would > do it if that is getting hit each time. Also, somewhat along a similar > line, the user authentication plugins call reset_session where needed. > If you are using one of them and calling the wrong method at the wrong > time you might be hitting that call to reset_session. > > jp > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Tried tracing the code, used breakpoints. The control flow does not touch any session initialization code. On Nov 12, 8:36 am, Abhi Manyu <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> may be everytime when you run the code the control flow is coming to > session initialization. try using breakpoint and check > > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
William Pratt
2007-Nov-14 15:36 UTC
Re: Session not working - new session being created for each
Do you have cookies disabled in your browser? -Bill Unni wrote:> Tried tracing the code, used breakpoints. The control flow does not > touch any session initialization code. > > On Nov 12, 8:36 am, Abhi Manyu <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: > >> may be everytime when you run the code the control flow is coming to >> session initialization. try using breakpoint and check >> >> -- >> Posted viahttp://www.ruby-forum.com/. >> > > > > >-- Sincerely, William Pratt --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
i checked the cookies so many times already now :) Bill, cookie file is being saved in machine, i am able to view it. but it gets updated everytime a new request is sent to the server. On Nov 14, 8:36 pm, William Pratt <bi...-YbheRAKfYF4eIZ0/mPfg9Q@public.gmane.org> wrote:> Do you have cookies disabled in your browser? > > -Bill > > > > Unni wrote: > > Tried tracing the code, used breakpoints. The control flow does not > > touch any session initialization code. > > > On Nov 12, 8:36 am, Abhi Manyu <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > > wrote: > > >> may be everytime when you run the code the control flow is coming to > >> session initialization. try using breakpoint and check > > >> -- > >> Posted viahttp://www.ruby-forum.com/. > > -- > Sincerely, > > William Pratt--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
William Pratt
2007-Nov-14 18:16 UTC
Re: Session not working - new session being created for each
Is it just being updated every time, or is session data being lost? -Bill On Nov 14, 2007, at 7:49 AM, Unni wrote:> > i checked the cookies so many times already now :) > > Bill, cookie file is being saved in machine, i am able to view it. but > it gets updated everytime a new request is sent to the server. > > On Nov 14, 8:36 pm, William Pratt <bi...-YbheRAKfYF4eIZ0/mPfg9Q@public.gmane.org> wrote: >> Do you have cookies disabled in your browser? >> >> -Bill >> >> >> >> Unni wrote: >>> Tried tracing the code, used breakpoints. The control flow does not >>> touch any session initialization code. >> >>> On Nov 12, 8:36 am, Abhi Manyu <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> >>> wrote: >> >>>> may be everytime when you run the code the control flow is coming >>>> to >>>> session initialization. try using breakpoint and check >> >>>> -- >>>> Posted viahttp://www.ruby-forum.com/. >> >> -- >> Sincerely, >> >> William Pratt > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
data is being lost. session is working exactly the same way as if im sending each request from a different machine. On Nov 14, 11:16 pm, William Pratt <bi...-YbheRAKfYF4eIZ0/mPfg9Q@public.gmane.org> wrote:> Is it just being updated every time, or is session data being lost? > > -Bill > > On Nov 14, 2007, at 7:49 AM, Unni wrote: > > > > > i checked the cookies so many times already now :) > > > Bill, cookie file is being saved in machine, i am able to view it. but > > it gets updated everytime a new request is sent to the server. > > > On Nov 14, 8:36 pm, William Pratt <bi...-YbheRAKfYF4eIZ0/mPfg9Q@public.gmane.org> wrote: > >> Do you have cookies disabled in your browser? > > >> -Bill > > >> Unni wrote: > >>> Tried tracing the code, used breakpoints. The control flow does not > >>> touch any session initialization code. > > >>> On Nov 12, 8:36 am, Abhi Manyu <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > >>> wrote: > > >>>> may be everytime when you run the code the control flow is coming > >>>> to > >>>> session initialization. try using breakpoint and check > > >>>> -- > >>>> Posted viahttp://www.ruby-forum.com/. > > >> -- > >> Sincerely, > > >> William Pratt--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
William Pratt
2007-Nov-15 06:21 UTC
Re: Session not working - new session being created for each
Ok, one last thought. What is the expires field of the cookie being set to? Is it somehow getting set to a time in the past? Even if it''s being set to the current time, that would cause it to expire before the next request. -Bill Unni wrote:> data is being lost. session is working exactly the same way as if im > sending each request from a different machine. > > On Nov 14, 11:16 pm, William Pratt <bi...-YbheRAKfYF4eIZ0/mPfg9Q@public.gmane.org> wrote: > >> Is it just being updated every time, or is session data being lost? >> >> -Bill >> >> On Nov 14, 2007, at 7:49 AM, Unni wrote: >> >> >> >> >>> i checked the cookies so many times already now :) >>> >>> Bill, cookie file is being saved in machine, i am able to view it. but >>> it gets updated everytime a new request is sent to the server. >>> >>> On Nov 14, 8:36 pm, William Pratt <bi...-YbheRAKfYF4eIZ0/mPfg9Q@public.gmane.org> wrote: >>> >>>> Do you have cookies disabled in your browser? >>>> >>>> -Bill >>>> >>>> Unni wrote: >>>> >>>>> Tried tracing the code, used breakpoints. The control flow does not >>>>> touch any session initialization code. >>>>> >>>>> On Nov 12, 8:36 am, Abhi Manyu <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> >>>>> wrote: >>>>> >>>>>> may be everytime when you run the code the control flow is coming >>>>>> to >>>>>> session initialization. try using breakpoint and check >>>>>> >>>>>> -- >>>>>> Posted viahttp://www.ruby-forum.com/. >>>>>> >>>> -- >>>> Sincerely, >>>> >>>> William Pratt >>>> > > >-- Sincerely, William Pratt --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---