Tilted Forum Project - TFP - Sexuality, Philosophy and Political Discussion

Go Back   Tilted Forum Project - TFP - Sexuality, Philosophy and Political Discussion > Interests > Tilted Technology

Reply
 
LinkBack Thread Tools
Old 03-10-2005, 07:10 AM   #1 (permalink)
d*d
Addict
 
d*d's Avatar
 
Join Date: Sep 2004
php session

just a quick one,
If i start a session using php files running on my server, then move the user to my secure server does the session end or carry on through?
__________________
see the irony ... SEE IT
d*d is offline   Reply With Quote
Old 03-10-2005, 10:11 AM   #2 (permalink)
Insane
 
Join Date: Apr 2003
Location: Chicago
I believe as long as you carry over the session number, ti should stay as the same session.
But it's been a while since i've done php.
Man I should practice.
RAGEAngel9 is offline   Reply With Quote
Old 03-12-2005, 12:31 AM   #3 (permalink)
Insane
 
Join Date: May 2003
Location: Austin, TX
no, if you redirect to a different server, the session will be lost. Session data is cached on the web server's hard drive, so unless you've got a shared directory set up for the session data, you can't guarantee the session will move.

One caveat to this is if you use cookies. You can tell PHP to force the user's browser to keep a cookie containing the session data. This will also be mirrored on the web server's hard drive "just in case". If you are careful, you can probably convince the browser to save the session data during the redirect and then retrieve it again on the new server.
skaven is offline   Reply With Quote
Old 03-12-2005, 12:46 AM   #4 (permalink)
Junkie
 
Join Date: Jul 2003
Location: Florida
I'd suggest storing the session data in an SQL table. Then you can pass the ID on to the other server and it can continue to use the data. There are several PHP classes available to do this with MySQL, for instance: http://www.code.dearneighbor.com/db_esession.html
irseg is offline   Reply With Quote
Reply

Bookmarks

Tags
php, session

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT -7. The time now is 02:36 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
All text (c) 2002-2008 Tilted Forum Project
"Insignia" vBulletin 3.5 - b6gm6n - x7x7x7.com