note 53865 deleted from function.session-start by bjori
| From: | bjori@php.net | Date: | Sun, 16 Apr 2006 00:30:25 +0000 |
| Subject: | note 53865 deleted from function.session-start by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-108219@lists.php.net to get a copy of this message | ||
Note Submitter: aaron at brackenclan dot com
----
I struggled with this for 3 days and wanted to share my thoughts, if anything is wrong, someone
please correct me.
When you do a session_start() and it isn't a persistant session (meaning when the browser is
closed the session is ended) it does not write a cookie to your computer and it does not re-write
the url if you have cookies turned off. Instead it simply passes it along in the http header
inforamation as Cookie: PHPSESSID=79b928a4cc86d5761d074e40f5f9b7f7 and references the file on the
server that corresponds to store variables
Then next step is under IE 6.0 all child windows share the http information with the parent. Meaning
if you have a window open and you have a link that opens a new window, they share that info.
My problem was I have two subdomains with seperate securities. I wanted to pass a user from one to
the other using seperate securities and sessions. The only way to do this is to name the sessions
using session_name('whatever'); on at least one of the sites or else the cookies will over
write each other. Once I did this the http header info looked like this Cookie:
intranet=cd429d1947ffc947856065f0bfdee799; PHPSESSID=79b928a4cc86d5761d074e40f5f9b7f7
and everything worked fine