PEAR + Smarty + Auth_HTTP

Aen

Новичок
PEAR + Smarty + Auth_HTTP

Установлено и настроено Smarty и PEAR.
Задача довольно простая, но я в тупике немного - нужно при помощи модуля Auth_HTTP сделать доступ к "секретной странице".
Вот сам код:
PHP:
<?php

require_once("Auth/HTTP.php"); //authorisation module
require_once("db_login.php"); //login 2 database
require_once("index.php"); //smarty config file

// setting the database connection options
$AuthOptions = array(
'dsn'=>"mysql://$db_username:$dbpassword_@$db_host/$db_database",
'table'=>"testable",                                 // 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";
	
};

?>
Вроде все правильно, но выдает сообщение "Headers already sent" и все. В чем проблема?

Использованное: Ubuntu Linux 9.04, PHP5, Apache 2.x
 
Сверху