Jump to content

User session expires immediately after opening another web page


tifoso

Recommended Posts

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!

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.