sub.mysite.com session different than mysite.com/sub
Posted: Thu Jun 03, 2004 3:17 pm
I'm currently programming my new, personal website again. I have a forum, and wish to have the session data from the forum inserted into my website to tie both the forum and the website together.
I put the forum in a subdomain, for I like the "professionalism" that it gives me.
However, the sessions in the subdomain.mysite.com are DIFFERENT, yes, I repeat, different, than the ones in mysite.com/subdomain. I don't know why, and I'm very frustrated.
If I'm logged into subdomain.mysite.com, then log out of mysite.com/subdomain, subdomain.mysite.com is not affected.
What should I do?
Site Session Code (lies in subdomain.mysite.com):
Header.php Code (lies in mysite.com/redesign/data/):
Furthermore, the $usertemplate variable is NOT being passed from site_session.php to header.php.
Any help is wildly appreciated. I can not admit that there is no other work-around than to not have my forum in a subdomain...
- The Monkey
I put the forum in a subdomain, for I like the "professionalism" that it gives me.
However, the sessions in the subdomain.mysite.com are DIFFERENT, yes, I repeat, different, than the ones in mysite.com/subdomain. I don't know why, and I'm very frustrated.
If I'm logged into subdomain.mysite.com, then log out of mysite.com/subdomain, subdomain.mysite.com is not affected.
What should I do?
Site Session Code (lies in subdomain.mysite.com):
Code: Select all
<?PHP
$site_include_path = 'http://www.yolegoman.com/redesign/data/';
include($site_include_path. 'config.php');
define('IN_PHPBB', true);
$site_root_path = '/home/yolegoma/public_html/';
$phpbb_root_path2 = '/monkeyslair/';
$phpbb_root_path = $site_root_path . $phpbb_root_path2;
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.php');
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
$loggedin = $userdata['session_logged_in'];
$username = $userdata['username'];
$usertemplate = 'adventure';
$uservisit = $userdata['user_lastvisit'];
$useremail = $userdata['user_email'];
$userwebsite = $userdata['user_website'];
// Now we shall select the template to use
if(!$usertemplate) {
$usertemplate = 'adventure';
}
include($site_include_path. 'template/' .$usertemplate. '.php');
?>Code: Select all
<?php
define('IN_PHPBB', true);
include('/home/yolegoma/public_html/monkeyslair/site_session.php');
?>Any help is wildly appreciated. I can not admit that there is no other work-around than to not have my forum in a subdomain...
- The Monkey