Eeek. Help with propagating a SESSION ID

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
MicahCarrick
Forum Newbie
Posts: 23
Joined: Sat Apr 09, 2005 5:40 pm

Eeek. Help with propagating a SESSION ID

Post by MicahCarrick »

I have a strange problem. I have a site in which I need to be able to propogate my session ID by some other means only if the user does not have cookies enabled. I can test for cookies and what not, however, I have some limitations which have me stumped...

- I don't have access to all the links to manually put in the PHPSESSID=SID in each one.
- If I change the session.use_trans_sid then it will ALWAYS use the GET method to propagate... right?

Is there some way I can store the session ID in a database and then pull it back up and reinstate the session using that?

Micah
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Re: Eeek. Help with propagating a SESSION ID

Post by timvw »

MicahCarrick wrote: - I don't have access to all the links to manually put in the PHPSESSID=SID in each one.
Yes, you have: http://www.php.net/output_add_rewrite_var
MicahCarrick wrote: - If I change the session.use_trans_sid then it will ALWAYS use the GET method to propagate... right?
Wrong.

url_rewriter.tags specifies which HTML tags are rewritten to include session id if transparent sid support is enabled. Defaults to a=href,area=href,frame=src,input=src,form=fakeentry,fieldset=

MicahCarrick wrote: Is there some way I can store the session ID in a database and then pull it back up and reinstate the session using that?
http://www.php.net/session_set_save_handler
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

Of course, if they're in HTML files, that's a different matter. Try htaccess.
Post Reply