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!

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.