PHP+MYSQL need to be used alongside ASPX+MSSQL on same Windows server
My site registers users through an ASPX form and MSSQL. I need to run an app in PHP+MYSQL parallel for the same set of users. So:
- I need to transfer user registration data from MSSQL, which is the entry point for users, to the MYSQL table.
- While browsing the site, the session should be transferred from ASPX to PHP pages so that relogin is not required when the user moves from one to the other.
My approach is to use an ASPX script to write the user registration data into MYSQL for use by the PHP+MYSQL app. Will the encoded password stored by MSSQL work with MYSQL when I insert the records?
Here’s a little idea about the second question – Perhaps using a common cookie which the ASPX page leaves and the PHP page picks to check for user status would work. Both apps, ASPX and PHP, are hosted on a Windows Server.
2 Solutions collect form web for “PHP+MYSQL need to be used alongside ASPX+MSSQL on same Windows server”
What you are saying is theoretically correct but it totally depends on what kind of membership you use, custom or something like the membership framework which stores the passwords hash (you can disable that from the web.config, but it is enabled by default)
and depends on what kind of php app you are using and its authentication scheme….
Of course the better solution would be to make the php app talk directly to the asp.net app and use its authentication system….
Nothing to say actually, except that I would suggest that you use mysql for both and that is it.. why use two servers? If you can get away with one it would be better.
Regarding copying the data… In order to make the applications sync, you will need to copy the data on-the-go (ie while it is being added to MSSQL). This means, your best best is to add a new connection to ASPX code to insert the data into MySQL as well.
Regarding making the online presence / sessions aware of each other – you can use a COOKIE that is assigned to the user once he performs login, having some hash generated at login time, which will identify your session to both parts of the app (both aspx and php), instead of the regular session mechanics.
However, the problem would be less “painful” if you could use the same database as a backend in both parts of your application. PHP can connect to a MSSQL database, and asp.net can easily connect to the MySQL database as well…