Session get destroyed randomly
Posted on 2010-11-21
I have a web app that uses session for user authenticating, I store the logged in user's username and a specific level. I use the session_start() in every page before any content starts. Upon first login user get redirected to a page which has some links to specific categories and user can go to each categories by clicking on link. So the issue is sometimes user get redirected again to the login screen because the session is destroyed. I used print_r($_SESSION); through out the site to see if the session is getting removed and some sometimes it return array() no session data at all.
I'm on a shared hosting environment.
Any idea what is happening ?
Thanks in advance.