I have developed a RoR application and would like add on a feature. Found a opensource solution (although developed in PHP). I wonder how I can integrate - they can share the same DB (MySQL) but how about session variables? Is there a way the php application and my rails app can share/exchange the session variables (e.g. user_id, company_id)? Thanks! -- 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 suppose there would be a way to implement a "single sign-on" system for your RoR and PHP applications. As far as sharing session variables, that would likely require some sort of service in each application to exchange that data. It''s my understanding that Rail is going to store Ruby objects in session data. You could write some sort of serializer/deserializer for reading the Ruby objects out of the sessions table for your Rails application, and vice-versa for your PHP session data, but that doesn''t sound like much fun and could be risky. I would think that creating a web service (RESTful service might be good) to exchange session data between the apps is more feasible. But problem one is to implement "single sign-on" so your users will have a nice experience moving between the two applications. On Mar 19, 12:06 pm, Gordon Lo <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I have developed a RoR application and would like add on a feature. > Found a opensource solution (although developed in PHP). I wonder how I > can integrate - they can share the same DB (MySQL) but how about session > variables? > > Is there a way the php application and my rails app can share/exchange > the session variables (e.g. user_id, company_id)? > > Thanks! > > -- > 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 -~----------~----~----~----~------~----~------~--~---
Robert Walker wrote:> I suppose there would be a way to implement a "single sign-on" system > for your RoR and PHP applications. > > As far as sharing session variables, that would likely require some > sort of service in each application to exchange that data. > > It''s my understanding that Rail is going to store Ruby objects in > session data. You could write some sort of serializer/deserializer > for reading the Ruby objects out of the sessions table for your Rails > application, and vice-versa for your PHP session data, but that > doesn''t sound like much fun and could be risky. > > I would think that creating a web service (RESTful service might be > good) to exchange session data between the apps is more feasible. But > problem one is to implement "single sign-on" so your users will have a > nice experience moving between the two applications. > > On Mar 19, 12:06 pm, Gordon Lo <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: >> I have developed a RoR application and would like add on a feature. >> Found a opensource solution (although developed in PHP). I wonder how I >> can integrate - they can share the same DB (MySQL) but how about session >> variables? >> >> Is there a way the php application and my rails app can share/exchange >> the session variables (e.g. user_id, company_id)? >> >> Thanks! >> >> -- >> Posted viahttp://www.ruby-forum.com/. > > > > >Also, you can do login from rails and proxy login info to PHP app. Check this two articles: http://wiki.rubyonrails.org/rails/pages/HowtosDoSingleSignOnWithPHPbb http://wiki.rubyonrails.com/rails/pages/ExampleCookieJarHelper best, Bojan -- Bojan Mihelac -> Ruby on Rails and Web Developer Blog : http://source.mihelac.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---