Home » Authentication » Auth_HTTP » Bug #2061
Auth 1.3.0r2 and Auth_HTTP Don't Work Together
Details
| Submitted | 2004-08-05 07:26 UTC |
|---|---|
| From | brandon at osuosl dot org |
| Assigned | hirokawa |
| Status | Closed |
| Package | Auth_HTTP |
| PHP Version | 4.3.8 |
| OS | Debian |
| Roadmaps | (Not assigned) |
Comments
[2004-08-05 07:26 UTC] brandon at osuosl dot org
Description:
------------
Fatal error: Call to undefined function: _importglobalvariable() in /usr/share/php/Auth/HTTP.php on line 77
When running Auth 1.3.0r2 the following error is created.
Reproduce code:
---------------
<?php
// example of Auth_HTTP basic implementation
require_once("Auth/HTTP.php");
// setting the database connection options
$AuthOptions = array(
'dsn'=>"mysql://asdf:asdf@localhost/auth",
'table'=>"auth", // your table name
'usernamecol'=>"username", // the table username column
'passwordcol'=>"PASSWORD", // the table password column
'cryptType'=>"md5", // password encryption type in your db
);
$a = new Auth_HTTP("DB", $AuthOptions);
$a->setRealm('yourrealm'); // realm name
$a->setCancelText('<h2>Error 401</h2>'); // error message if authentication fails
$a->start(); // starting the authentication process
if($a->getAuth()) // checking for autenticated user
{
echo "Hello $a->username welcome to my secret page";
};
?>