w4r Posted July 7, 2008 Share Posted July 7, 2008 Hello all, Im new to the forum. I'm having an strange problem. I have a login system that works fine... the problem is: 1- u login to the system (checks username/password and makes the session) 2- u do something on the site (like posting a comment) 3- post is into the database 4- redirect (meta refresh) to somepage and HERE, the session is destroyed... ??? u login again... do the same thing, and u dont get the session destroyed. obviously i dont have a session_destroy() there.. session should not be destroyed since the codes are on different places i will try to take all the code out to copy it here.. but the problem doesnt seem to be the code. i dont know... im really lost here. Link to comment https://forums.phpfreaks.com/topic/113519-strange-problem-with-sessions/ Share on other sites More sharing options...
w4r Posted July 7, 2008 Author Share Posted July 7, 2008 Hello all, Im new to the forum. I'm having an strange problem. I have a login system that works fine... the problem is: 1- u login to the system (checks username/password and makes the session) 2- u do something on the site (like posting a comment) 3- post is into the database 4- redirect (meta refresh) to somepage and HERE, the session is destroyed... ??? u login again... do the same thing, and u dont get the session destroyed. obviously i dont have a session_destroy() there.. session should not be destroyed since the codes are on different places i will try to take all the code out to copy it here.. but the problem doesnt seem to be the code. i dont know... im really lost here. damn... stupid problem the problem was that i was using http://localhost, and i was using a meta refresh with http://192.blabla and it seems that it makes 2 different sessions Link to comment https://forums.phpfreaks.com/topic/113519-strange-problem-with-sessions/#findComment-583305 Share on other sites More sharing options...
cooldude832 Posted July 7, 2008 Share Posted July 7, 2008 if you don't have session_start() on top of every page you need sessions to be used on then the session activity can't be retrived on that page and sometimes if you php.ini is configed in a certain manner the recycler can easily destroy that server side session data when the use navigates to a portion of your site not using sessions. Link to comment https://forums.phpfreaks.com/topic/113519-strange-problem-with-sessions/#findComment-583306 Share on other sites More sharing options...
w4r Posted July 7, 2008 Author Share Posted July 7, 2008 if you don't have session_start() on top of every page you need sessions to be used on then the session activity can't be retrived on that page and sometimes if you php.ini is configed in a certain manner the recycler can easily destroy that server side session data when the use navigates to a portion of your site not using sessions. thanks but problem is already solved Link to comment https://forums.phpfreaks.com/topic/113519-strange-problem-with-sessions/#findComment-583314 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.