Wildcard SSL and sessions

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
mbaroz
Forum Commoner
Posts: 29
Joined: Sun Feb 05, 2006 10:10 am

Wildcard SSL and sessions

Post by mbaroz »

Hi
I need help , I have wildcard certificate that i use for other domains as Mydomain.maindomain.com and the HTTP domain is: http://www.Mydomain.com

When i redirecting/linking from HTTP session to HTTPS session i loose the session Vars/ARRAYS
I would like to use a simple page that copies whole arrays / vars from the HTTP Session ->https

I tried to pass the PHPSESSID to the HTTPS session using $_COOKIE['PHPSESSID']=session_id();

well it is working only on the HTTPS session But loose all when im back to the HTTP session

Please help , any other solution ? ( i dont want to start managing a table in the Database..)

Thanks
moshe
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

I cannot reproduce the behaviour.
Which browser do you use?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Pass the session ID via the URL. Transferring across security boundries is a division line for cookies most often.
mbaroz
Forum Commoner
Posts: 29
Joined: Sun Feb 05, 2006 10:10 am

Wildcard SSL and sessions

Post by mbaroz »

I am using IE / Mozilla FireFox
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Not to drag up an old thread, but when passing a session id by URL, we use SID or PHPSESSID as the get var?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Code: Select all

'?' . rawurlencode(session_name()) . '=' . rawurlencode(session_id())
is my preferred sort of way.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

That is sweet. Thanks feyd.
Post Reply