1

I'm currently developing a website in PHP, however a large section of the website (that I can't redevelop) is in ASP.NET.

I require a system where our clients can login, and then be logged in to both the PHP and the ASP pages of our site. I've done a bit of research and come up with a few ideas but I'm not sure what the best method is?

  • Use a cookie that both languages can access and read/write to
  • Use some sort of HTAccess/Digest Auth that will result in one login for all pages
  • Use a DB session that both can read, although not sure how to implement this, especially seeing as I'm having trouble accessing the MSSQL server from PHP, only a MySQL - can ASP access a mysql server?
  • Some sort of login script as follows:
    • User logins in and submits to PHP page
    • Login processed with PHP and session created etc
    • User/pw rePOSTed to asp page
    • ASP page proccesses login and stores it's session etc
    • ASP returns back to 'after-login' page..

To be honest, I'm not sure what the best solution is! Your thoughts would be appreciated!

Thanks,

Dave

1
  • ASP can talk to MySQL through ODBC at the very least I would have thought. Commented May 25, 2012 at 9:16

1 Answer 1

1

I don`t know the specific parts of your application but from the stated i would go for Cookie. It is easy solution, and pretty much solid. And if you have any session variables, well it is on the server side so you will not have any problems accessing them.

Any other solution, script or db session would be job duplication. But everything depends on the data you are storing and complexity/security you need.

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

Comments

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.