tifoso Posted September 30, 2011 Share Posted September 30, 2011 Each of my web pages has the following: <?php require_once('auth.php'); ?> The auth.php looks like: <?php //Start session session_start(); //Check whether the session variable SESS_MEMBER_ID is present or not if(!isset($_SESSION['SESS_MEMBER_ID']) || (trim($_SESSION['SESS_MEMBER_ID']) == '')) { header("location: access-denied.php"); exit(); } ?> It does work as it should - access-denied message appears when the session expired after some longer time or when someone tries to access a password protected webpages without logging in. HOWEVER, I have added an .xml file to the server which now includes all the menu buttons like 'home', 'contact us' etc. After doing this, I've noticed that every time I open a web browser, especially IE and click one of the menu buttons after logging in, I get an instant message saying your session has expired etc. When I login again, it works fine until… until I close the web browser. After re-opening the web browser, logging in again and clicking on the menu buttons, the problem re-occurs. Does anyone have an idea how this can be fixed? Thank you! Link to comment https://forums.phpfreaks.com/topic/248167-user-session-expires-immediately-after-opening-another-web-page/ Share on other sites More sharing options...
Drummin Posted September 30, 2011 Share Posted September 30, 2011 <?php require('auth.php'); ?> Link to comment https://forums.phpfreaks.com/topic/248167-user-session-expires-immediately-after-opening-another-web-page/#findComment-1274432 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.