GregL83 Posted August 8, 2008 Share Posted August 8, 2008 Hey all . I have built a login system using AJAX. The system worked perfect on my local machine. Once I uploaded the script to my hosting server I noticed a problem. I can log in and the session variables are carried to each page; however, when I go to my domain root for example http://domain.com instead of http://domain.com/index.php I run into problems. The session seems to exist in radical states. The session variables I set are recognized at random about 40% of the time. I can hit refresh multiple times and watch myself be logged in and be logged out like a slot machine. No other page is experiencing this problem. Even stranger, I logged out and went to domain root http://domain.com and hit refresh and achieved the same results. My session variables were existent sometimes and non existent other times. I went back to other pages on my site and the session variables did not exist because I had logged out. Obviously this seems to be a problem with my sessions. At the top of each page <?php session_start(); ?> is placed. I then use a login class to check if the user is logged in and set $logged_in equal to true or false. My basic page flow is as follows: LOGIN random page -> login popup div -> send login form elements to ajax page located in ajax folder -> ajax page uses login class to login or display errors LOGOUT random page -> logout page -> call login class to destroy session and variables Quote Link to comment Share on other sites More sharing options...
GregL83 Posted August 9, 2008 Author Share Posted August 9, 2008 No one?!? I have this posted on several sites with no responses... Quote Link to comment Share on other sites More sharing options...
corbin Posted August 9, 2008 Share Posted August 9, 2008 Code would help. Quote Link to comment Share on other sites More sharing options...
GregL83 Posted August 10, 2008 Author Share Posted August 10, 2008 My web host had the save session line commented out of the PHP.ini file! Solved. 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.