setacity Posted September 18, 2008 Share Posted September 18, 2008 I want my PHP session to be maintained as I move to between sub-domains. This works in IE7, Opera, Safari, and Chrome, but not in Firefox 3. There are two links below. The intended result is that they should both print the same session_id to the screen. What am I doing wrong? http://www.schedulepanda.com/simpleTest1.php <? session_set_cookie_params(0 , '/', '.schedulepanda.com'); session_start(); print session_id(); print '<a href="http://app.schedulepanda.com/simpleTest2.php" />test 2</a><br/>'; if ( !defined('COOKIE_DOMAIN') ) print_r(session_get_cookie_params()); ?> http://app.schedulepanda.com/simpleTest2.php <? session_set_cookie_params(0 , '/', '.schedulepanda.com'); session_start(); print session_id(); print '<a href="http://www.schedulepanda.com/simpleTest1.php" />test 1</a><br/>'; if ( !defined('COOKIE_DOMAIN') ) print_r(session_get_cookie_params()); ?> Link to comment https://forums.phpfreaks.com/topic/124867-maintaining-sessions-across-sub-domains/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.