phpmash Posted June 10, 2006 Share Posted June 10, 2006 Presently i have a site mysite.com In the home page users can login. So I want to use a SESSION variable to store his login name and want to redirect him to user.mysite.com. But the session variable is not available in subdomin user.mysite.com In my server php.ini is not available. So i expect a solution thru coding(ie not using configuration file php.ini)Presently the problem is encountered in Firefox not in IEThanks phpmash Link to comment https://forums.phpfreaks.com/topic/11652-session-subdomain/ Share on other sites More sharing options...
joquius Posted June 10, 2006 Share Posted June 10, 2006 just run a DB session method with no $_SESSION variable Link to comment https://forums.phpfreaks.com/topic/11652-session-subdomain/#findComment-44042 Share on other sites More sharing options...
phpmash Posted June 10, 2006 Author Share Posted June 10, 2006 From where I will get more details regarding the DB session Link to comment https://forums.phpfreaks.com/topic/11652-session-subdomain/#findComment-44052 Share on other sites More sharing options...
joquius Posted June 10, 2006 Share Posted June 10, 2006 I believe [a href=\"http://www.phpfreaks.com/forums/index.php?showtopic=95405\" target=\"_blank\"]this topic[/a] deals with this matter Link to comment https://forums.phpfreaks.com/topic/11652-session-subdomain/#findComment-44060 Share on other sites More sharing options...
mainewoods Posted June 10, 2006 Share Posted June 10, 2006 I made some posts to this topic that might be what you need:[a href=\"http://www.phpfreaks.com/forums/index.php?showtopic=95510\" target=\"_blank\"]http://www.phpfreaks.com/forums/index.php?showtopic=95510[/a] Link to comment https://forums.phpfreaks.com/topic/11652-session-subdomain/#findComment-44131 Share on other sites More sharing options...
toplay Posted June 11, 2006 Share Posted June 11, 2006 If the sub-domain is on the same server, you don't need to go through the trouble of having to save sessions in a DB (although I like to do that).You can start by trying this:Set the [a href=\"http://us2.php.net/session#ini.session.cookie-domain\" target=\"_blank\"]'session.cookie_domain'[/a] to '.mysite.com'. Notice there's a dot before the domain name. This allows the session cookie to be used at www.mysite.com or anysubdomain.mysite.com.You can use [a href=\"http://us2.php.net/manual/en/function.ini-set.php\" target=\"_blank\"]ini_set()[/a] or [a href=\"http://us2.php.net/manual/en/function.session-set-cookie-params.php\" target=\"_blank\"]session_set_cookie_params()[/a] to set it. Link to comment https://forums.phpfreaks.com/topic/11652-session-subdomain/#findComment-44160 Share on other sites More sharing options...
phpmash Posted June 12, 2006 Author Share Posted June 12, 2006 Thanks GuysI could solve the problemmash Link to comment https://forums.phpfreaks.com/topic/11652-session-subdomain/#findComment-44634 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.