phpbar.de logo

Mailinglisten-Archive

[php] phplibs authentifizierungsproblem

[php] phplibs authentifizierungsproblem

jimi m.jistel_(at)_gmx.net
Mon, 25 Sep 2000 13:54:43 +0200


This is a multi-part message in MIME format.

------=_NextPart_000_001C_01C026F8.280C1800
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Hallo!

Ich habe ein problem mit der auth. von phplibs.
Wenn ich auf eine Seite mit Login will kommt diese Meldung:
Fatal error: DB_Sql is already a function or class in ./lib/db_mysql.inc on
line 12

und ich habe keine Ahnung woran es liegen kann.
Im Kopf von jeder Datei rufe ich folgendes auf.

<?if ($anmeld=="yes"){if
($auth->auth["uid"]=="nobody"){$auth->login_if(yes);};};?>

Ich schicke die local.inc mal mit.

Mfg Micha

------=_NextPart_000_001C_01C026F8.280C1800
Content-Type: application/octet-stream;
	name="local.inc"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="local.inc"

<?php=0A=
=0A=
class ekomdb extends DB_Sql {=0A=
  var $Host     =3D "localhost";=0A=
  var $Database =3D "ekom";=0A=
  var $User     =3D "wwwrun";=0A=
  var $Password =3D "";=0A=
}=0A=
=0A=
class Session1_CT_Sql extends CT_Sql {=0A=
  var $database_class =3D "ekomdb";          ## Which database to =
connect...=0A=
  var $database_table =3D "active_sessions"; ## and find our session =
data in this table.=0A=
}=0A=
=0A=
=0A=
class Session1 extends Session {=0A=
  var $classname =3D "Session1";=0A=
=0A=
  var $cookiename     =3D "";                ## defaults to classname=0A=
  var $magic          =3D "weworksgreat";      ## ID seed=0A=
  var $mode           =3D "get";          ## We propagate session IDs =
with cookies=0A=
  ##var $fallback_mode  =3D "get";=0A=
  var $lifetime       =3D 0;                 ## 0 =3D do session =
cookies, else minutes=0A=
  var $that_class     =3D "Session1_CT_Sql"; ## name of data storage =
container=0A=
  var $gc_probability =3D 5;  =0A=
}=0A=
=0A=
class partner_User extends User {=0A=
  var $classname =3D "partner_User";=0A=
=0A=
  var $magic          =3D "moretowork";     ## ID seed=0A=
  var $that_class     =3D "Session1_CT_Sql"; ## data storage container=0A=
}=0A=
=0A=
class partner_Auth extends Auth {=0A=
  var $classname      =3D "partner_Auth";=0A=
=0A=
  var $lifetime       =3D  30;=0A=
=0A=
  var $database_class =3D "ekomdb";=0A=
  var $database_table =3D "daten";=0A=
  =0A=
  function auth_loginform() {=0A=
    global $sess;=0A=
    global $_PHPLIB;=0A=
=0A=
    include("auth-partner.php3");=0A=
  }=0A=
  =0A=
  function auth_validatelogin() {=0A=
    global $username, $password;=0A=
=0A=
    if(isset($username)) {=0A=
      $this->auth["uname"]=3D$username;        ## This provides access =
for "loginform.ihtml"=0A=
    }=0A=
    =0A=
    =0A=
    $uid =3D false;=0A=
    =0A=
    $this->db->query(sprintf("select uid ".=0A=
                             "        from %s ".=0A=
                             "       where benutzer =3D '%s' ".=0A=
                             "         and passwort =3D '%s'",=0A=
                          $this->database_table,=0A=
                          addslashes($username),=0A=
                          addslashes($password)));=0A=
=0A=
    while($this->db->next_record()) {=0A=
      $uid =3D $this->db->f("uid");=0A=
      ##$this->auth["perm"] =3D $this->db->f("perms");=0A=
    }=0A=
    return $uid;=0A=
  }=0A=
}=0A=
=0A=
class partner_Default_Auth extends partner_Auth {=0A=
  var $classname =3D "Example_Default_Auth";=0A=
  =0A=
  var $nobody    =3D true;=0A=
}=0A=
?>=0A=

------=_NextPart_000_001C_01C026F8.280C1800--



php::bar PHP Wiki   -   Listenarchive