alexville Posted August 31, 2008 Share Posted August 31, 2008 Hey guys, This problem has bugged me for the longest time and I thought you guys could take me out of my misery. The thing is, I have a php login script. The one from http://www.evolt.org/node/60384 And when a user logins into my site at the url and clicks remember me: alexville.com (without the www.) the new url after login is www.alexville.com. But when they close their browser or just even go to alexville.com (without the www.) again they are not logged in. This is probably a simple fix, and probably easier for someone that already knows this login script. Could someone give me a fix for this, because I am losing my mind!!! ??? ??? ??? ??? ??? ??? ??? Quote Link to comment Share on other sites More sharing options...
alexville Posted August 31, 2008 Author Share Posted August 31, 2008 bump Quote Link to comment Share on other sites More sharing options...
DarkWater Posted August 31, 2008 Share Posted August 31, 2008 You need to play around with the session cookie's domain parameter in your php.ini, because as far as your browser knows, they're two separate domains unless you tell it otherwise. Quote Link to comment Share on other sites More sharing options...
alexville Posted August 31, 2008 Author Share Posted August 31, 2008 You need to play around with the session cookie's domain parameter in your php.ini, because as far as your browser knows, they're two separate domains unless you tell it otherwise. The thing is, i'm on free hosting. So, is there some other way to do this? Or what should I tell my web hoster? Quote Link to comment Share on other sites More sharing options...
DarkWater Posted August 31, 2008 Share Posted August 31, 2008 Pay for hosting then, because 99.99% of all free hosting ends up being crap. You get what you pay for. Quote Link to comment Share on other sites More sharing options...
alexville Posted August 31, 2008 Author Share Posted August 31, 2008 Pay for hosting then, because 99.99% of all free hosting ends up being crap. You get what you pay for. Thats not completely true. Even If I bought hosting, I still couldn't change the php.ini file because its on a shared server. Quote Link to comment Share on other sites More sharing options...
Psycho Posted August 31, 2008 Share Posted August 31, 2008 Add this before session_start() [usiong your parameters]: ini_set("session.cookie_domain", ".mydomain.com"); http://www.madcarrot.co.uk/2005/08/pass_sessions_b.html Quote Link to comment Share on other sites More sharing options...
alexville Posted August 31, 2008 Author Share Posted August 31, 2008 Never mind, solved the problem by automatically redirecting all alexville.com traffic to www.alexville.com using Cpanel Quote Link to comment 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.