Forum: Ruby on Rails How to integrate a PHP app with RoR app?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Fd74f0ea67a0251db9dca6c404c4f615?d=identicon&s=25 Gordon Lo (wynners33)
on 2007-03-19 17:06
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

Is there a way the php application and my rails app can share/exchange
the session variables (e.g. user_id, company_id)?

21f7ed21f11a809050594c82eab11d67?d=identicon&s=25 Robert Walker (Guest)
on 2007-03-19 17:33
(Received via mailing list)
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 <>
866edcb271e88be4bfd935eea7947730?d=identicon&s=25 Bojan Mihelac (Guest)
on 2007-03-19 18:39
(Received via mailing list)
Robert Walker wrote:
> doesn't sound like much fun and could be risky.
>> can integrate - they can share the same DB (MySQL) but how about session
> >

Also, you can do login from rails and proxy login info to PHP app.
Check this two articles:


Bojan Mihelac
-> Ruby on Rails and Web Developer Blog :
This topic is locked and can not be replied to.