[PHP] Re: Passing variables between servers
You cannot avoid using cookies. When you use Sessions web server is making use of cookies (unless you go for URL rewriting) which remains in the browser until one quits the browser. To tackle your situation, you can effectively make use of a database table and a session cookie: 1. set a session cookie (different from one set by the server) as a soon as as a login is successful. This cookie should be set in such a way that the browser will send it back to any server in your domain. The value for this cookie can be the same as the value PHP generated for the Session ID. If you prefer to use some other value make sure that it is different for each session for each user to avoid security issues. 2. Store this value and the user ID (or something else to identify that user in your app) in a table. 3. Remove this row from the table when the user logs out or on Session timeout. Now, when the user is taken to your ASP server, browser will send that cookie set by the PHP server along with the request and the ASP server can query the database for that cookie value to get the user ID. If it can find it in the table the application can make sure that the request is valid and the rest of the info can be pulled from the database. Anil On Wed, 21 Aug 2002, Mark McCulligh wrote: I have two server. One running PHP/Linux the other running ASP/2000. The user logins into the PHP server and session variables are made to hold their username, password, department, etc.. The site from time to time redirect the user to the ASP server. I want to pass the session variable across to the other server. I can't use the GET method. (www.domain.com/form.asp?username=Mark.) because putting the password on the address bar is not an option. The ASP server will redirect them back when they are done on it. It will pass back the variables just in case the session on the PHP server has expired for the PHP server can create a new session if needed. I don't want to use a cookie. I was thinking of using cURL but I can't fine any information about using it in ASP. I know how to use cURL in PHP to redirect the user to the ASP server and pass the variables in the POST method, but not the other way. Any ideas would be a GREAT help. Mark. _ Mark McCulligh, Application Developer / Analyst Sykes Canada Corporation www.SykesCanada.com [EMAIL PROTECTED] -- +91 471 324341 (Office) +91 98473 22280 (Cell) Linuxense Information Systems Pvt. Ltd., Trivandrum, India http://www.linuxense.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Passing variables between servers
Is there any reason to pass the data to the ASP server other than the need for the ASP server to pass it back in case the PHP server session has expired? If not, why not just store the login information in a local table referencable by a primary key that you pass around instead? You could even do this with GET. --- Seairth Jacobs [EMAIL PROTECTED] Mark McCulligh [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have two server. One running PHP/Linux the other running ASP/2000. The user logins into the PHP server and session variables are made to hold their username, password, department, etc.. The site from time to time redirect the user to the ASP server. I want to pass the session variable across to the other server. I can't use the GET method. (www.domain.com/form.asp?username=Mark.) because putting the password on the address bar is not an option. The ASP server will redirect them back when they are done on it. It will pass back the variables just in case the session on the PHP server has expired for the PHP server can create a new session if needed. I don't want to use a cookie. I was thinking of using cURL but I can't fine any information about using it in ASP. I know how to use cURL in PHP to redirect the user to the ASP server and pass the variables in the POST method, but not the other way. Any ideas would be a GREAT help. Mark. _ Mark McCulligh, Application Developer / Analyst Sykes Canada Corporation www.SykesCanada.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Passing variables between servers
The session variables are need on both server for authorization needs. The two servers host two separate Intranet apps and I am trying to join the two together into one Intranet app. The variable will be used on both sides. The reason I don't what to use cookie is your users keep disabling them. They think a web site can use a cookie to break into their computer. They also disable JavaScript a lot too. _ Mark McCulligh, Application Developer / Analyst Sykes Canada Corporation www.SykesCanada.com [EMAIL PROTECTED] - Original Message - From: Seairth Jacobs [EMAIL PROTECTED] Newsgroups: php.general To: [EMAIL PROTECTED] Sent: Wednesday, August 21, 2002 2:18 PM Subject: Re: Passing variables between servers Is there any reason to pass the data to the ASP server other than the need for the ASP server to pass it back in case the PHP server session has expired? If not, why not just store the login information in a local table referencable by a primary key that you pass around instead? You could even do this with GET. --- Seairth Jacobs [EMAIL PROTECTED] Mark McCulligh [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have two server. One running PHP/Linux the other running ASP/2000. The user logins into the PHP server and session variables are made to hold their username, password, department, etc.. The site from time to time redirect the user to the ASP server. I want to pass the session variable across to the other server. I can't use the GET method. (www.domain.com/form.asp?username=Mark.) because putting the password on the address bar is not an option. The ASP server will redirect them back when they are done on it. It will pass back the variables just in case the session on the PHP server has expired for the PHP server can create a new session if needed. I don't want to use a cookie. I was thinking of using cURL but I can't fine any information about using it in ASP. I know how to use cURL in PHP to redirect the user to the ASP server and pass the variables in the POST method, but not the other way. Any ideas would be a GREAT help. Mark. _ Mark McCulligh, Application Developer / Analyst Sykes Canada Corporation www.SykesCanada.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Passing variables between servers
[snip] The session variables are need on both server for authorization needs. The two servers host two separate Intranet apps and I am trying to join the two together into one Intranet app. The variable will be used on both sides. The reason I don't what to use cookie is your users keep disabling them. They think a web site can use a cookie to break into their computer. They also disable JavaScript a lot too. [/snip] What about installing PHP on the IIS server and when time comes to pass back the information using the same method? Trying to think outside the box ... Jay *** * Texas PHP Developers Conf Spring 2003 * * T Bar M Resort Conference Center * * New Braunfels, Texas* * San Antonio Area PHP Developers Group * * Interested? Contact [EMAIL PROTECTED] * *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Passing variables between servers
I have thought about this also, but I need the variables in the ASP session and I don't have the time line to rewrite the ASP pages over in PHP. The current ASP app took a year to develop. I have thought about having PHP on both servers and having the PHP on the 2000 server just save the variables to a XML file or ini file, then have the ASP code read it in, but I thought there is probable some easy solution out there for passing information around. cURL looked like a solution but I can't find information on it using ASP. Maybe I am looking of a easy solutions that doesn't exist and will have to just use the longer one. Thanks for your input, Mark. _ Mark McCulligh, Application Developer / Analyst Sykes Canada Corporation www.SykesCanada.com (888)225-6824 ex. 3262 [EMAIL PROTECTED] - Original Message - From: Jay Blanchard [EMAIL PROTECTED] To: 'Mark McCulligh' [EMAIL PROTECTED]; 'Seairth Jacobs' [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, August 21, 2002 3:34 PM Subject: RE: [PHP] Re: Passing variables between servers [snip] The session variables are need on both server for authorization needs. The two servers host two separate Intranet apps and I am trying to join the two together into one Intranet app. The variable will be used on both sides. The reason I don't what to use cookie is your users keep disabling them. They think a web site can use a cookie to break into their computer. They also disable JavaScript a lot too. [/snip] What about installing PHP on the IIS server and when time comes to pass back the information using the same method? Trying to think outside the box ... Jay *** * Texas PHP Developers Conf Spring 2003 * * T Bar M Resort Conference Center * * New Braunfels, Texas* * San Antonio Area PHP Developers Group * * Interested? Contact [EMAIL PROTECTED] * *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Passing variables between servers
http://www.w3.org/TR/SOAP/ ~ Matthew -Original Message- From: Mark McCulligh [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 21, 2002 4:14 PM To: Jay Blanchard Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Re: Passing variables between servers I have thought about this also, but I need the variables in the ASP session and I don't have the time line to rewrite the ASP pages over in PHP. The current ASP app took a year to develop. I have thought about having PHP on both servers and having the PHP on the 2000 server just save the variables to a XML file or ini file, then have the ASP code read it in, but I thought there is probable some easy solution out there for passing information around. cURL looked like a solution but I can't find information on it using ASP. Maybe I am looking of a easy solutions that doesn't exist and will have to just use the longer one. Thanks for your input, Mark. _ Mark McCulligh, Application Developer / Analyst Sykes Canada Corporation www.SykesCanada.com (888)225-6824 ex. 3262 [EMAIL PROTECTED] - Original Message - From: Jay Blanchard [EMAIL PROTECTED] To: 'Mark McCulligh' [EMAIL PROTECTED]; 'Seairth Jacobs' [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, August 21, 2002 3:34 PM Subject: RE: [PHP] Re: Passing variables between servers [snip] The session variables are need on both server for authorization needs. The two servers host two separate Intranet apps and I am trying to join the two together into one Intranet app. The variable will be used on both sides. The reason I don't what to use cookie is your users keep disabling them. They think a web site can use a cookie to break into their computer. They also disable JavaScript a lot too. [/snip] What about installing PHP on the IIS server and when time comes to pass back the information using the same method? Trying to think outside the box ... Jay *** * Texas PHP Developers Conf Spring 2003 * * T Bar M Resort Conference Center * * New Braunfels, Texas* * San Antonio Area PHP Developers Group * * Interested? Contact [EMAIL PROTECTED] * *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Passing variables between servers
Why not share a session DB across both servers? Since your users disable cookies you'll have a url that looks like this anyway: http://www.myPHPserver.com/index.php?sid=12345 if you wanted to maintain session state so, when redirecting to the ASP server do: header('location: http://www.myASPserver.com/default.asp?sid=12345') then have default.asp open the DB that has the sessions for the PHP server through ODBC or ADO or whatever and match the session id pulling out the stored info for that session. -GED -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php