views:

92

answers:

1

I have a sign up process that is in a legacy framework and we are trying to switch to a new framework...in fact a different language. So let's say that there are 3 steps in the sign up process and each of those 3 steps has it's own file(step1.php, step2.php, step3.php).
Now if I want to change page2.php to a python file I will still need the session information from page1.php. How can I transfer this information between the two pages while maintaining a valid session and obviously security.

We want to integrate this language switch in the same repository as the original one and doing releases of the new changes. So that's the agile part. (I'm still not sold that this is the best way to do it but I'm more curious)

+2  A: 

In PHP, store the session information in a database, encoded in JSON. In Python, pull the session ID from the cookie and look up the session information in the database.

Ignacio Vazquez-Abrams
+1'ed, but what's the maintenance cost of having to support this system for any length of time?
Akoi Meexx
Assuming PHP's session handler interface remains stable, not that much. If it's believed that the database engine could possibly change then it would be wise to use the database abstraction classes in PEAR, and possibly SQLAlchemy.
Ignacio Vazquez-Abrams