Visualizzazione risultati 1 fino 10 di 10

Discussione: perchè mi da errore in una pagina di login ???

  1. #1
    Guest

    Question perchè mi da errore in una pagina di login ???

    http://italianghosts.altervista.org/login/login.php

    il codice della pagina è:
    <?php require_once('Connections/fd.php'); ?>
    <?php
    // *** Validate request to login to this site.
    session_start();

    $loginFormAction = $_SERVER['PHP_SELF'];
    if (isset($accesscheck)) {
    $GLOBALS['PrevUrl'] = $accesscheck;
    session_register('PrevUrl');
    }

    if (isset($_POST['nome'])) {
    $loginUsername=$_POST['nome'];
    $password=$_POST['password'];
    $MM_fldUserAuthorization = "";
    $MM_redirectLoginSuccess = "http.//www.italianghosts.altervista.org/membri";
    $MM_redirectLoginFailed = "http.//www.italianghosts.altervista.org/nologin";
    $MM_redirecttoReferrer = false;
    mysql_select_db($database_fd, $fd);

    $LoginRS__query=sprintf("SELECT Username, PASSWORD FROM login WHERE Username='%s' AND PASSWORD='%s'",
    get_magic_quotes_gpc() ? $loginUsername : addslashes($loginUsername), get_magic_quotes_gpc() ? $password : addslashes($password));

    $LoginRS = mysql_query($LoginRS__query, $fd) or die(mysql_error());
    $loginFoundUser = mysql_num_rows($LoginRS);
    if ($loginFoundUser) {
    $loginStrGroup = "";

    //declare two session variables and assign them
    $GLOBALS['MM_Username'] = $loginUsername;
    $GLOBALS['MM_UserGroup'] = $loginStrGroup;

    //register the session variables
    session_register("MM_Username");
    session_register("MM_UserGroup");

    if (isset($_SESSION['PrevUrl']) && false) {
    $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
    }
    header("Location: " . $MM_redirectLoginSuccess );
    }
    else {
    header("Location: ". $MM_redirectLoginFailed );
    }
    }
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Documento senza titolo</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    </head>

    <body>
    <p>&nbsp;</p>
    <form ACTION="<?php echo $loginFormAction; ?>" name="form1" id="form1" method="POST">
    <p>NOME
    <input type="text" name="nome" />
    PASSWORD
    <input name="password" type="password" />
    <input name="Submit" type="submit" lang="it" value="Invia" />
    </p>
    </form>

    </body>
    </html>
    Ultima modifica di italianghosts : 15-05-2008 alle ore 15.30.07

  2. #2
    Guest

    Predefinito

    Mi sembra chiaro l'errore riportato: non trova il file che tenti di includere.
    Effettivamente non esiste: http://italianghosts.altervista.org/...ections/fd.php


    Ciao!

  3. #3
    Guest

    Predefinito

    grazie. adesso però ci ho riprovato una decina di volte e quindi chiedo di nuovo aiuto.
    questo sarebbe il codice della pagina
    <?php require_once('Connections/fd.php'); ?>
    <?php
    // *** Validate request to login to this site.
    session_start();

    $loginFormAction = $_SERVER['PHP_SELF'];
    if (isset($accesscheck)) {
    $GLOBALS['PrevUrl'] = $accesscheck;
    session_register('PrevUrl');
    }

    if (isset($_POST['nome'])) {
    $loginUsername=$_POST['nome'];
    $password=$_POST['password'];
    $MM_fldUserAuthorization = "";
    $MM_redirectLoginSuccess = "http.//www.italianghosts.altervista.org/membri";
    $MM_redirectLoginFailed = "http.//www.italianghosts.altervista.org/nologin";
    $MM_redirecttoReferrer = false;
    mysql_select_db($database_fd, $fd);

    $LoginRS__query=sprintf("SELECT Username, PASSWORD FROM login WHERE Username='%s' AND PASSWORD='%s'",
    get_magic_quotes_gpc() ? $loginUsername : addslashes($loginUsername), get_magic_quotes_gpc() ? $password : addslashes($password));

    $LoginRS = mysql_query($LoginRS__query, $fd) or die(mysql_error());
    $loginFoundUser = mysql_num_rows($LoginRS);
    if ($loginFoundUser) {
    $loginStrGroup = "";

    //declare two session variables and assign them
    $GLOBALS['MM_Username'] = $loginUsername;
    $GLOBALS['MM_UserGroup'] = $loginStrGroup;

    //register the session variables
    session_register("MM_Username");
    session_register("MM_UserGroup");

    if (isset($_SESSION['PrevUrl']) && false) {
    $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
    }
    header("Location: " . $MM_redirectLoginSuccess );
    }
    else {
    header("Location: ". $MM_redirectLoginFailed );
    }
    }
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Documento senza titolo</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    </head>

    <body>
    <p>&nbsp;</p>
    <form ACTION="<?php echo $loginFormAction; ?>" name="form1" id="form1" method="POST">
    <p>NOME
    <input type="text" name="nome" />
    PASSWORD
    <input name="password" type="password" />
    <input name="Submit" type="submit" lang="it" value="Invia" />
    </p>
    </form>
    <p><em>*esegui il login con lo stesso nome e la stessa password che usi su Age of Empires 3 </em> </p>
    </body>
    </html>
    in pratica mi dice che io dovrei avere un file chiamato fd.php nella cartella connection
    ho anche controllato che esista il file, è questo:
    <?php
    # FileName="Connection_php_mysql.htm"
    # Type="MYSQL"
    # HTTP="true"
    $hostname_fd = "localhost";
    $database_fd = "my_italianghosts";
    $username_fd = "italianghosts";
    $password_fd = "*******";
    $fd = mysql_pconnect($hostname_fd, $username_fd, $password_fd) or trigger_error(mysql_error(),E_USER_ERROR);
    ?>
    cosa devo fare?
    Ultima modifica di debug : 16-05-2008 alle ore 15.11.54

  4. #4
    L'avatar di miki92
    miki92 non è connesso AlterGuru 2500
    Data registrazione
    21-04-2007
    Residenza
    Procida (NA)
    Messaggi
    4,226

    Predefinito

    Allora, se questo script si trova nella cartella login all'interno della tua root inserisci:
    Codice PHP:
    <?php require_once('../Connections/fd.php'); ?>
    <?php
    // *** Validate request to login to this site.
    session_start();

    $loginFormAction = $_SERVER['PHP_SELF'];
    if (isset(
    $accesscheck)) {
    $GLOBALS['PrevUrl'] = $accesscheck;
    session_register('PrevUrl');
    }

    if (isset(
    $_POST['nome'])) {
    $loginUsername=$_POST['nome'];
    $password=$_POST['password'];
    $MM_fldUserAuthorization = "";
    $MM_redirectLoginSuccess = "http://www.italianghosts.altervista.org/membr i";
    $MM_redirectLoginFailed = "http://www.italianghosts.altervista.org/nolog in";
    $MM_redirecttoReferrer = false;
    mysql_select_db($database_fd, $fd);

    $LoginRS__query=sprintf("SELECT Username, PASSWORD FROM login WHERE Username='%s' AND PASSWORD='%s'",
    get_magic_quotes_gpc() ? $loginUsername : addslashes($loginUsername), get_magic_quotes_gpc() ? $password : addslashes($password));

    $LoginRS = mysql_query($LoginRS__query, $fd) or die(mysql_error());
    $loginFoundUser = mysql_num_rows($LoginRS);
    if (
    $loginFoundUser) {
    $loginStrGroup = "";

    //declare two session variables and assign them
    $GLOBALS['MM_Username'] = $loginUsername;
    $GLOBALS['MM_UserGroup'] = $loginStrGroup;

    //register the session variables
    session_register("MM_Username");
    session_register("MM_UserGroup");

    if (isset(
    $_SESSION['PrevUrl']) && false) {
    $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
    }
    header("Location: " . $MM_redirectLoginSuccess );
    }
    else {
    header("Location: ". $MM_redirectLoginFailed );
    }
    }
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Documento senza titolo</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    </head>

    <body>
    <p>&nbsp;</p>
    <form ACTION="<?php echo $loginFormAction; ?>" name="form1" id="form1" method="POST">
    <p>NOME
    <input type="text" name="nome" />
    PASSWORD
    <input name="password" type="password" />
    <input name="Submit" type="submit" lang="it" value="Invia" />
    </p>
    </form>
    <p><em>*esegui il login con lo stesso nome e la stessa password che usi su Age of Empires 3 </em> </p>
    </body>
    </html>
    Altrimenti devi inserire quello tuo.
    Apprezzi l'aiuto? Offrimi un caffè!

  5. #5
    Guest

    Predefinito

    la root cosa è?

  6. #6
    Guest

    Predefinito

    La radice del tuo spazio, quella in cui dev'esserci la index


    ciao!

  7. #7
    Guest

    Predefinito

    ok ma adesso prova ad andare qui : http://www.italianghosts.altervista.org/nologin
    a te la vede o ti da errore?

  8. #8
    Guest

    Predefinito

    Quell'url non porta da nessuna parte!


    Ciao!

  9. #9
    Guest

    Predefinito

    come no!?!?!
    è una pagina nella cartella accesso chiamata nologin
    il codice:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Documento senza titolo</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    </head>

    <body>
    <h3><h3><h3><h3><h3><h3><h2><h1>
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="953" height="76">
    <param name="movie" value="text1.swf" />
    <param name="quality" value="high" />
    <embed src="text1.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="953" height="76" ></embed>
    </object>
    </h1></h2></h3></h3></h3></h3>
    </h3>
    <p>&nbsp;</p>
    <p>Non &egrave; stato possibile effettuare l' accesso</p>
    <p><a href="http://www.italianghosts.altervista.org/login" target="http://www.italianghosts.altervista.org/login">Torna alla pagina di login</a></p>
    </h3>
    </body>
    </html>

  10. #10
    Guest

    Predefinito

    Clicka sul link che hai postato, e guarda cosa succede...


    ciao!

Regole di scrittura

  • Non puoi creare nuove discussioni
  • Non puoi rispondere ai messaggi
  • Non puoi inserire allegati.
  • Non puoi modificare i tuoi messaggi
  •