neverett Posted February 1, 2008 Share Posted February 1, 2008 Is there any way I can set the session domain. If so, how do I go about doing this? Do I need to require it only once? If you could give any help, I would greatly appreciate it. Quote Link to comment https://forums.phpfreaks.com/topic/88851-solved-session-parameters/ Share on other sites More sharing options...
revraz Posted February 1, 2008 Share Posted February 1, 2008 Not sure what you mean by session domain. It's set by the domain the page is on when you execute session_start() Quote Link to comment https://forums.phpfreaks.com/topic/88851-solved-session-parameters/#findComment-455097 Share on other sites More sharing options...
neverett Posted February 1, 2008 Author Share Posted February 1, 2008 Well when you login for instance, it starts the session with the domain of domain.com. However when it checks your login, the session isn't set so it forces you to login. This is because the session didn't have www.domain.com. So you have to login twice because the session domains do not match and therefore won't send the information to the server. I hope that makes sense. Quote Link to comment https://forums.phpfreaks.com/topic/88851-solved-session-parameters/#findComment-455099 Share on other sites More sharing options...
revraz Posted February 1, 2008 Share Posted February 1, 2008 Are you using www. in front of your page that checks the login? Use relative paths instead of absolutes, if you are. Quote Link to comment https://forums.phpfreaks.com/topic/88851-solved-session-parameters/#findComment-455102 Share on other sites More sharing options...
neverett Posted February 1, 2008 Author Share Posted February 1, 2008 I'm using a meta-refresh redirect [i.e. - sendredirect("http://www.domain.com");]. Are you saying to do something like sendredirect("checklogin.php"); then sendredirect("loggedin.php");? Quote Link to comment https://forums.phpfreaks.com/topic/88851-solved-session-parameters/#findComment-455105 Share on other sites More sharing options...
revraz Posted February 1, 2008 Share Posted February 1, 2008 Yes, you are forcing www. and changing the domain if they didn't use it to come in. Quote Link to comment https://forums.phpfreaks.com/topic/88851-solved-session-parameters/#findComment-455109 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.