I usually use an html redirection for this.
<html>
<head>
<?php
if(isset($_SESSION['variable'])) {
?>
<meta http-equiv="Refresh" content="300 url=logout.php" />
<?php
}
?>
</head>
Then logout.php is nothing more than destroying the session and redirecting them to a page telling them that their session has expired.
<?php
$_SESSION = array();
@session_destroy();
header("Location: /expired.html");
?>