Ciao Davide,
l'include_once('/var/www/html/SquidTL/common.inc.php'); punta al path corretto ?
Grazie, Michele
On 19/04/2011 16:23, Davide Lastri wrote: > Ciao, > squidtl_auth l'ho messo sotto /usr/lib/squid/squidtl_auth, ma all'interno di questo file non trovo nessun path riferito al config.xml > > Ecco il file: > <?php > > include_once('/var/www/html/SquidTL/common.inc.php'); > > if (! defined(STDIN)) { > define("STDIN", fopen("php://stdin", "r")); > } > while (!feof(STDIN)) { > $line = trim(fgets(STDIN)); > $fields = explode(' ', $line); > $username = rawurldecode($fields[0]); > $password = rawurldecode($fields[1]); > > $db = OpenDB(); > > $result = mysql_query("SELECT Username,Context,Type FROM DB_Users WHERE Username='$username' AND Password=PASSWORD('$password');"); > if($result === false) { > fwrite(STDOUT, "ERR\n"); > exit(1); > } > if(mysql_num_rows($result) > 0) { > $row = mysql_fetch_array($result,MYSQL_ASSOC); > $Username = stripslashes($row["Username"]); > $Context = stripslashes($row["Context"]); > mysql_query("UPDATE DB_Users SET LastLogin=NOW() WHERE Username='$Username';"); > fwrite(STDOUT, "OK\n"); > } else { > fwrite(STDOUT, "ERR\n"); > } > } > > ?> >
-- O-Zone ! No (C) since 1996 On the road with VFR VTec 2002 "Vuffy", on the net with Linux Slackware. Home+BLOG @ http://www.zerozone.it - Travels @ http://www.openitaly.net
Ciao Davide,
l'include_ once('/ var/www/ html/SquidTL/ common. inc.php' ); punta al path
corretto ?
Grazie, Michele
On 19/04/2011 16:23, Davide Lastri wrote: squid/squidtl_ auth, ma all'interno di questo file non trovo nessun path riferito al config.xml once('/ var/www/ html/SquidTL/ common. inc.php' ); php://stdin" , "r")); $fields[ 0]); $fields[ 1]); Context, Type FROM DB_Users WHERE Username= '$username' AND Password= PASSWORD( '$password' );"); num_rows( $result) > 0) { array($ result, MYSQL_ASSOC) ; $row["Username" ]); $row["Context" ]); '$Username' ;");
> Ciao,
> squidtl_auth l'ho messo sotto /usr/lib/
>
> Ecco il file:
> <?php
>
> include_
>
> if (! defined(STDIN)) {
> define("STDIN", fopen("
> }
> while (!feof(STDIN)) {
> $line = trim(fgets(STDIN));
> $fields = explode(' ', $line);
> $username = rawurldecode(
> $password = rawurldecode(
>
> $db = OpenDB();
>
> $result = mysql_query("SELECT Username,
> if($result === false) {
> fwrite(STDOUT, "ERR\n");
> exit(1);
> }
> if(mysql_
> $row = mysql_fetch_
> $Username = stripslashes(
> $Context = stripslashes(
> mysql_query("UPDATE DB_Users SET LastLogin=NOW() WHERE Username=
> fwrite(STDOUT, "OK\n");
> } else {
> fwrite(STDOUT, "ERR\n");
> }
> }
>
> ?>
>
-- www.zerozone. it - Travels @ http:// www.openitaly. net
O-Zone ! No (C) since 1996
On the road with VFR VTec 2002 "Vuffy", on the net with Linux Slackware.
Home+BLOG @ http://