2

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)

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

2 Comments

+1'ed, but what's the maintenance cost of having to support this system for any length of time?
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.