Forum » Izdelava spletišč » Težava z login skripto - rabim pomoč
Težava z login skripto - rabim pomoč
operater ::
Spodnjo skripto sem uporabljal na RH 9.0 v index.php in je normalno delovala. Sedaj sem prešel na Fedoro 2.0 in
mi omenjena skripta ne deluje. Verjetno rabim aktiviran kak service za avtorizacijo ali pa kaj drugega.
Je komu zadeva znana in bi mi podal nasvet, kje iskati napako.
Hvala za odgovore.
LPG
< ?php
// Start of admin login section //
// You must remove this section if you cannot view this file properly. //
// note! security issues arise if section removed. //
$USER = "test";
$PASS = "test";
function error ($error_message) {
echo $error_message."
";
exit;
}
if ( (!isset($PHP_AUTH_USER)) || ! (($PHP_AUTH_USER == $USER) && ( $PHP_AUTH_PW == "$PASS" )) ) {
header("WWW-Authenticate: Basic entrer=\"Form2txt admin\"");
header("HTTP/1.0 401 Unauthorized");
error("MUST LOGIN WITH USER/PASS TO VIEW CONTENTS");
}
// End of admin login section //
?>
< ?php
if ($no) {
setcookie("InvoiceMaster[0]", "null", time() + 0, '/');
setcookie("InvoiceMaster[1]", "null", time() + 0, '/');
setcookie("InvoiceMaster[2]", "null", time() + 0, '/');
setcookie("InvoiceMaster[3]", "null", time() + 0, '/');
setcookie("InvoiceMaster[4]", "null", time() + 0, '/');
setcookie("InvoiceMaster[5]", "null", time() + 0, '/');
setcookie("InvoiceMaster[6]", "null", time() + 0, '/');
setcookie("InvoiceMaster[7]", "null", time() + 0, '/');
$logout_message = "
}
?>
mi omenjena skripta ne deluje. Verjetno rabim aktiviran kak service za avtorizacijo ali pa kaj drugega.
Je komu zadeva znana in bi mi podal nasvet, kje iskati napako.
Hvala za odgovore.
LPG
< ?php
// Start of admin login section //
// You must remove this section if you cannot view this file properly. //
// note! security issues arise if section removed. //
$USER = "test";
$PASS = "test";
function error ($error_message) {
echo $error_message."
";
exit;
}
if ( (!isset($PHP_AUTH_USER)) || ! (($PHP_AUTH_USER == $USER) && ( $PHP_AUTH_PW == "$PASS" )) ) {
header("WWW-Authenticate: Basic entrer=\"Form2txt admin\"");
header("HTTP/1.0 401 Unauthorized");
error("MUST LOGIN WITH USER/PASS TO VIEW CONTENTS");
}
// End of admin login section //
?>
< ?php
if ($no) {
setcookie("InvoiceMaster[0]", "null", time() + 0, '/');
setcookie("InvoiceMaster[1]", "null", time() + 0, '/');
setcookie("InvoiceMaster[2]", "null", time() + 0, '/');
setcookie("InvoiceMaster[3]", "null", time() + 0, '/');
setcookie("InvoiceMaster[4]", "null", time() + 0, '/');
setcookie("InvoiceMaster[5]", "null", time() + 0, '/');
setcookie("InvoiceMaster[6]", "null", time() + 0, '/');
setcookie("InvoiceMaster[7]", "null", time() + 0, '/');
$logout_message = "
You have been successfully logged out.
\n";}
?>
Vredno ogleda ...
Tema | Ogledi | Zadnje sporočilo | |
---|---|---|---|
Tema | Ogledi | Zadnje sporočilo | |
» | Prenašanje cookijev med poddomenamiOddelek: Informacijska varnost | 1864 (1579) | jype |
» | PHP cookie problemOddelek: Izdelava spletišč | 1343 (1038) | Ziga Dolhar |
» | unset cookieOddelek: Izdelava spletišč | 1878 (1685) | tomitza |
» | phpNuke problem s cookijiOddelek: Izdelava spletišč | 1296 (1228) | the_unborn |
» | Tracking v PHPjuOddelek: Programiranje | 1728 (1613) | darh |