in pratica quando effettuo il login da utente nella barra degli indirizzi del browser si evidenzia questo link [/url]http://www.catturavisite.altervista.org/members/?PHPSESSID=9kvfj17mssfnh8rf0ud92211u6 e successivamente mi dice File Doesn't Exist (E' UN PROBLEMA DELLA SESSIONE?)
Il file interessato ritengo sia mem_auth.php il cui contenuto è il seguente:
Codice:
<?php
session_start();
session_destroy();
session_start();
include("../vars.php");
mysql_connect($db_host, $db_user, $db_pwd);
mysql_select_db($db_name);
if ($_POST['form'] == 'sent') {
if (trim($_POST['email']) == "" || trim($_POST['passwd']) == "") {
echo("<head><title>$title</title><meta http-equiv=\"Refresh\" content=\"1;URL=$self_url\"></head><body><font face=\"$fontface\" color=\"red\"><span style=\"font-size:250%\">$title</span><br><span style=\"font-size:150%\">Login details cannot be blank!</span></font></body></html>");
$_SESSION = array();
session_destroy();
mysql_close;
exit;
} elseif (ereg('@', trim($_POST['email']))) {
$_SESSION['sess_name'] = trim($_POST['email']);
$_SESSION['sess_passwd'] = md5(trim($_POST['passwd']));
header("Location: $self_url" . "members/?".session_name() . "=" . session_id());
mysql_close;
exit;
} elseif (is_numeric(trim($_POST['email']))) {
$res = mysql_query("select * from user where id='" . trim($_POST['email']) . "' && passwd='".trim($_POST['passwd'])."'");
if (mysql_num_rows($res) != 0) {
$_SESSION['sess_name'] = mysql_result($res, 0, "email");
$_SESSION['sess_passwd'] = md5(trim($_POST['passwd']));
header("Location: $self_url" . "members/?".session_name() . "=" . session_id());
mysql_close;
exit;
} else {
echo("<head><title>$title</title><meta http-equiv=\"Refresh\" content=\"1;URL=$self_url\"></head><body><font face=\"$fontface\" color=\"red\"><span style=\"font-size:250%\">$title</span><br><span style=\"font-size:150%\">Invalid login details!</span></font></body></html>");
$_SESSION = array();
session_destroy();
mysql_close;
exit;
}
} else {
echo("<head><title>$title</title><meta http-equiv=\"Refresh\" content=\"1;URL=$self_url\"></head><body><font face=\"$fontface\" color=\"red\"><span style=\"font-size:250%\">$title</span><br><span style=\"font-size:150%\">Invalid login details!</span></font></body></html>");
$_SESSION = array();
session_destroy();
mysql_close;
exit;
}
} else {
echo("<head><title>$title</title><meta http-equiv=\"Refresh\" content=\"1;URL=$self_url\"></head><body><font face=\"$fontface\" color=\"red\"><span style=\"font-size:250%\">$title</span><br><span style=\"font-size:150%\">You are not authorized to view this area!</span></font></body></html>");
$_SESSION = array();
session_destroy();
mysql_close;
exit;
}
?>
altro file imputato Headfoot di cui vorrei per favore sapere se questa funzione è riconosciuta dal server di altervista
Codice:
}
function file_reader($fileurl) {
$fileurl = $_SERVER['DOCUMENT_ROOT'] . $fileurl;
$file = fopen($fileurl,'r') or die("File Doesn't Exist");
$contents = fread($file,filesize($fileurl));
fclose($file);
return $contents;