<?php

$path = ini_get('session.save_path');

if (!is_dir($path)) {
    exit("<font color='red'>Session Directory does not exist: ".$path."</font>");
}
if (!is_readable($path)) {
    exit("<font color='red'>Insufficient read permissions for the Session Directory: ".$path."</font>");
}
if (!is_writable($path)) {
    exit("<font color='red'>Insufficient write permissions for the Session Directory: ".$path."</font>");
}
else {
	echo "<p>You should see a listing of files in the Session Directory below.<p>If you do not see any files, or if the files listed are not session files, then there is a problem.";
	echo "<hr><p>";
	$dh = opendir($path);
	while ($file = readdir($dh)) {
		echo $file;
		}
}

?>