note 53865 added to function.session-start
| From: | aaronatbrackenclandotcom at osu1 dot php dot net | Date: | Wed, 15 Jun 2005 15:51:51 +0000 |
| Subject: | note 53865 added to function.session-start | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-90474@lists.php.net to get a copy of this message | ||
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
----
Manual Page -- http://www.php.net/manual/en/function.session-start.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+53865
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+53865&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+53865&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+53865&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+53865&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+53865&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+53865&report=yes
Search -- http://master.php.net/manage/user-notes.php