Fatal error: Call to undefined function: query() in C:\php\pear\Auth\Container\DB.php on line 136
| From: | Glemnitz, Wolfgang | Date: | Wed, 16 Oct 2002 07:02:00 +0000 |
| Subject: | Fatal error: Call to undefined function: query() in C:\php\pear\Auth\Container\DB.php on line 136 | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-2502@lists.php.net to get a copy of this message | ||
Hello,
I have a problem.
System:
W2k SP3, Apache 1.3.27(C:\apache) , PhP 4.2.3 (C:\php),
Auth 1.43 (20020831) C:\php\pear\auth)
Documentroot G:\webroot
I start the login procedure with /datenbanken/login.php:
<?php
require_once "Auth/Auth.php";
require_once "DB.php";
$dsn = "odbc://username:password@tcp+172.28.112.16:3111/museum";
$db = new Auth('DB', $dsn);
$db->start();
if( PEAR::isError( $db)) {
echo $db -> getMessage() ;
}
if ($db->getAuth()) {
echo "<a href=/datenbanken/museum/museumlogin.php></a>\n";
}
?>
in the Auth.php
require_once "PEAR.php";
and
function drawLogin($username = "")
{
if ($this->loginFunction != "") {
call_user_func($this->loginFunction, $username, $this->status);
} else {
$server = &$this->_importGlobalVariable("server");
echo "<center>\n";
echo "<body bgcolor=#008000>";
if (!empty($this->status) && $this->status == AUTH_EXPIRED) {
echo "<i>Das Session-Timeout wurde überschritten.</i>\n";
echo "<i>Bitte loggen Sie sich erneut ein!</i>\n";
} else if (!empty($this->status) && $this->status == AUTH_IDLED) {
echo "<i>Authentifizierungs-Timeout wurde überschritten.</i>\n";
echo "<i>Bitte loggen Sie sich erneut ein!</i>\n";
} else if (!empty ($this->status) && $this->status == AUTH_WRONG_LOGIN)
{
echo "<i>Bitte überprüfen Sie Ihre Login-Daten!</i>\n";
}
PEAR::raiseError("You are using the built-in login screen of
PEAR::Auth.<br/>See the <a href=\"http://pear.php.net/manual/\">manual</a>
for details on how to create your own login function.", null,
PEAR_ERROR_PRINT);
echo "<form method=\"post\" action=\"" .
$server['PHP_SELF'] . "\">\n";
echo "<table width=\"400\" table border=\"0\"
cellpadding=\"2\"
cellspacing=\"0\">\n";
echo "<h1>Hallo Nutzer</h1>\n";
echo "Bitte geben Sie Ihren Anmeldenamen und das Passwort<br>\n";
echo "in der richtigen Schreibweise ein.<br>\n";
echo "<h2> Groß- und Kleinschreibung
beachten!</h2><br><br>\n";
echo "<td colspan=\"2\" bgcolor=\"#eeeeee\"><b>Login zur
Altai:</b><br>\n";
echo "<tr>\n";
echo "<td>Name:</td>\n";
echo "<td bgcolor=\"#FFD700\"><input type=\"text\"
name=\"username\"
value=\"" . $username . "\"></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td>Passwort:</td>\n";
echo "<td bgcolor=\"#FFD700\"><input type=\"password\"
name=\"password\"></td>\n";
echo "<tr>\n";
echo "<td colspan=\"2\" bgcolor=\"#eeeeee\"><input
type=\"submit\"></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td colspan=\"2\" bgcolor=\"#eeeeee\"><input
type=\"reset\"></td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "</form>\n";
echo "</body>";
echo "</center>\n\n";
}
}
after submit:
Fatal error: Call to undefined function: query() in
C:\php\pear\Auth\Container\DB.php on line 136
C:\php\pear\Auth\Container\DB.php :
...
require_once "Auth/Container.php";
require_once "DB.php";
...
function query($query)
{
if (!DB::isConnection($this->db)) {
$this->_connect($this->options['dsn']);
}
return $this->db->query($query); <--line 136
}
I have no idea, where i can find the error.
What wrong do I make?
Regards and thanks,
Wolfgang Glemnitz