2009年11月25日星期三

[fw-auth] problem with zend_auth

Hello everyone.

I am following this tutorial. http://www.youtube.com/user/integral30#p/c/90503BB7541343E9/7/4oNo-l6c-H0

But i am getting an error:

Catchable fatal error: Argument 1 passed to Zend_Auth_Adapter_DbTable::__construct() must be an instance of Zend_Db_Adapter_Abstract, null given, called in K:\xampp\htdocs\nrka\application\controllers\AuthenticationController.php on line 44 and defined in K:\xampp\php\PEAR\Zend\Auth\Adapter\DbTable.php on line 128

And this is the method:

private function getAuthAdapter(){
       
        $authAdapter = new Zend_Auth_Adapter_DbTable(Zend_Db_Table::getDefaultAdapter());
        $authAdapter->setTableName('persons')
                    ->setIdentityColumn('per_email')
                    ->setCredentialColumnt('per_passoword')
                    ->setCredentialTeatment("MD5");
                   
        return $authAdapter;
    }

I have set the resources in my ini file:

resourses.db.adapter =  mysqli
resourses.db.params.host    = localhost
resourses.db.params.username = root
resourses.db.params.password =
resourses.db.params.dbname = zftutorial

That's going wrong?

没有评论: