> HELP? I AM ABOUT TO PULL MY HAIR OUT? I can't tell from here... move closer to the monitor. > I have already spent time reading over the online php manual and I still > can't figure a way around this issue. I notice that when I start a session > and I create session variables, those variables are attached to the > specific > domain. For example: > > both of the urls point to the same place: > > http://www.test.com/start.php > > http://ww2.test.com/start.php > > I have noticed however that if you create a session variable in the > following file http://www.test.com/start.php > and try to access from a file http://www2.test.com/access.php the variable > will not exist. > > The reason I am asking all these questions is that in my code I need the > ability to do a re-direct to a secure site such as https://secure.test.com > but still maintain all of the session variables and keep the same session > open.
Session IDs are passed in cookies. Cookies are, by default, set to the current domain. So a cookie set on 'www.test.com' will not be available to 'ww2.test.com'. You can try to adjust the cookie domain property to 'test.com' like someone else mentioned, or pass the session ID in the URL when linking to the other domain. This will only work if both domains use the same directory for storing session files, though. ---John W. Holmes... Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php