« Traffic jams in Venice? | Main | What would an iPhone cost without a contract? »

January 09, 2007

Integrating Ruby on Rails with PHP

I'm currently looking to integrate functionality built with Ruby on Rails into a PHP 4 environment. Basically I need to find out if someone accessing the RoR functionality has previously signed on to the main PHP application. Everything is running on the same server.

Up to now I've found a blog entry on codesnipers from Nola Stowe that would suggest it isn't particularly difficult to access PHP sessions from RoR. Nola also points to PHPSession which seems to be exactly what I'm looking for.

Any other suggestions or input on doing this out there?

Posted by Matthew at January 9, 2007 09:37 AM

Comments

If integrating means sharing a session between php and ruby, then you also might consider keeping the session in a common database table. It might work.
From php write a session handler to use that table and from Rails a model should do it.

Posted by: xandr at January 9, 2007 01:18 PM