Dhaval Phansalkar
2008-May-13 13:19 UTC
2 seperate appls on the same server but runs only one
hi, i''ve 2 appls on the server. both are of same type but with different DB and different ports. when i login to first appl on say port 3000 and then access 2nd appl on port 3001, the first appl loggs off. so its like only one application works at a time. i''ve modified my.cnf for max_connections but that also didn''t work. can somebody help in this please?? -Dhaval -- 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 -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-May-13 13:22 UTC
Re: 2 seperate appls on the same server but runs only one
On 13 May 2008, at 14:19, Dhaval Phansalkar wrote:> > hi, > i''ve 2 appls on the server. both are of same type but with different > DB and different ports. when i login to first appl on say port 3000 > and > then access 2nd appl on port 3001, the first appl loggs off. so its > like > only one application works at a time. i''ve modified my.cnf for > max_connections but that also didn''t work. can somebody help in this > please??I suspect it''s because they''re both trying to store the same session cookie. You can set the name of the session cookie used in environment.rb (config.action_controller.session = { :session_key => ''_foo_session'', etc...}) Fred --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Dhaval Phansalkar
2008-May-13 13:39 UTC
Re: 2 seperate appls on the same server but runs only one
Hi Fred, Thanks for the quick reply. but i couldn''t get u. actually i''m using restful authentication. the line u mentioned is commented in the environment.rb in both the appl. but yes, both have session controller in common but thr also no session cookie is maintained. can u explain a bit more on this please? P.S.:- those 2 appls i''m talking abt are on the PRODUCTION server. the same type of appls work on my DEV server without any prb. -Dhaval -- 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 -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-May-13 13:49 UTC
Re: 2 seperate appls on the same server but runs only one
On 13 May 2008, at 14:39, Dhaval Phansalkar wrote:> > Hi Fred, > Thanks for the quick reply. but i couldn''t get u. actually i''m using > restful authentication. the line u mentioned is commented in the > environment.rb in both the appl. but yes, both have session controller > in common but thr also no session cookie is maintained. can u > explain a > bit more on this please? >What I was getting at was that both apps are trying to use the same session cookie, which you can change in environment.rb Fred> P.S.:- those 2 appls i''m talking abt are on the PRODUCTION server. the > same type of appls work on my DEV server without any prb. > > -Dhaval > -- > 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 -~----------~----~----~----~------~----~------~--~---
Dhaval Phansalkar
2008-May-13 14:47 UTC
Re: 2 seperate appls on the same server but runs only one
hi Fred, i put "config.action_controller.session_store = {:session_key => ''_foo_session'', :secret => ''secret-secret''}" in my env.rb file but that gave me this error- Status: 500 Internal Server Error Content-Type: text/html undefined method `new'' for {:session_key=>"_foo_session", :secret=>"secret-secret"}:Hash is this something to do with the rails version? i''m using 1.2.5. if yes, is thr any alternative for that? -Dhaval -- 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 -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-May-13 14:57 UTC
Re: 2 seperate appls on the same server but runs only one
On 13 May 2008, at 15:47, Dhaval Phansalkar wrote:> > hi Fred, > i put "config.action_controller.session_store = {:session_key => > ''_foo_session'', :secret => ''secret-secret''}" in my env.rb file but > that > gave me this error- > Status: 500 Internal Server Error Content-Type: text/html > undefined method `new'' for {:session_key=>"_foo_session", > :secret=>"secret-secret"}:Hash > > is this something to do with the rails version? i''m using 1.2.5. if > yes, > is thr any alternative for that?Ah yes it''s probably different on 1.2.5. I used to have something like ActionController ::CgiRequest::DEFAULT_SESSION_OPTIONS.update(:session_key => ''foo_session'') at the bottom of environment.rb Fred --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Dhaval Phansalkar
2008-May-13 15:10 UTC
Re: 2 seperate appls on the same server but runs only one
put the same line, but still no luck :(. seriously don''t understand wt the prb is :(, hitting my head harder to work this one out... is thr any other way :o? -Dhaval -- 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 -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-May-13 15:16 UTC
Re: 2 seperate appls on the same server but runs only one
On 13 May 2008, at 16:10, Dhaval Phansalkar wrote:> > put the same line, but still no luck :(. seriously don''t understand wt > the prb is :(, hitting my head harder to work this one out... is thr > any > other way :o? >I''m sure you did this anyway, but just to check, you did set the session key to different things for both apps and restart them? Have you tried eyeballing your cookies in firefox to check they''re not getting remove when you don''t expect them? You can see session ids in the logs, so if they change unexpectedly that also implies the cookie has vaporized. Fred> -Dhaval > -- > 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 -~----------~----~----~----~------~----~------~--~---
glennswest
2008-May-14 00:23 UTC
Re: 2 seperate appls on the same server but runs only one
Another thing is to use IE to access one, and Firefox to access another. If its a cookie problem/session problem, it will "work". You are storing your session in the database? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Dhaval Phansalkar
2008-May-14 05:13 UTC
Re: 2 seperate appls on the same server but runs only one
@fred yes, i''ve restarted both apls after changes suggested. mainly this appl is targeted at IE7 users only so didn''t chk sessions in the firefox, rather i don''t know how to chk that in firefox though. i also chkd the log but couldn''t understand the prb from that. @ glennswest, yes,u r right.i''d tried this one yesterday only before i left, but forgot to mention it here. it works on separate browsers. prb is when both appl opened in the same browser but on separate tab. is thr any solution for that? abt storing session in DB, i''m not sure but i don''t think so because thrs neither any table called as session nor any field in other tables. -D -- 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 -~----------~----~----~----~------~----~------~--~---