当前位置:  开发笔记 > 编程语言 > 正文

通过我的INI文件Zend Error

如何解决《通过我的INI文件ZendError》经验,为你挑选了1个好方法。

我在我的网站上收到以下错误,但是,我不知道我要做什么.我知道我错过了一些东西,然而,我无法弄明白.

你可以在这里看到我想要实现的目标:4.6.4.Zend_Application_Resource_Session

致命错误:在C:\ xampp\htdocs\app\library\Zend\Db\Table\Abstract.php中找到未捕获的异常'Zend_Db_Table_Exception',消息'找不到Zend_Session_SaveHandler_DbTable的适配器':667堆栈跟踪:#0 C:\ xampp\htdocs\app\library\Zend\Db\Table\Abstract.php(652):Zend_Db_Table_Abstract - > _ setupDatabaseAdapter()#1 C:\ xampp\htdocs\app\library\Zend\Session\SaveHandler\DbTable.php(401) :Zend_Db_Table_Abstract - > _ setup()#2 C:\ xampp\htdocs\app\library\Zend\Db\Table\Abstract.php(286):Zend_Session_SaveHandler_DbTable - > _ setup()#3 C:\ xampp\htdocs\verelo\library\Zend\Session\SaveHandler\DbTable.php(205):Zend_Db_Table_Abstract - > __ construct(Array)#4 C:\ xampp\htdocs\app\library\Zend\Application\Resource\Session.php(59):Zend_Session_SaveHandler_DbTable- > __ construct(Array)#5 C:\ xampp\htdocs\app\library\Zend\Application\Resource\ResourceAbstract.php(93):Zend_Application_Resource_Session-> setSaveHandler(Array)#6 C:\ xampp\htdocs\app\library\Zend\Application\Resource\ResourceAbstract.php(72):Ze 第667行的C:\ xampp\htdocs\app\library\Zend\Db\Table\Abstract.php中的nd_Application_R

这是我的config.ini文件:

[production]
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
includePaths.library = APPLICATION_PATH "/../library"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"

resources.db.adapter = "pdo_mysql"
resources.db.params.host = "localhost"
resources.db.params.username = "root"
resources.db.params.password = ""
resources.db.params.dbname = "app"
resources.db.isDefaultTableAdapter = true

resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
;resources.frontController.moduleControllerDirectoryName = "actions"
;resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
;resources.frontController.defaultControllerName = "site"
;resources.frontController.defaultAction = "home"
;resources.frontController.defaultModule = "static"
;resources.frontController.baseUrl = "/subdir"
;resources.frontController.plugins.foo = "My_Plugin_Foo"
;resources.frontController.plugins.bar = "My_Plugin_Bar"
resources.frontController.env = APPLICATION_ENV

resources.layout.layout = "layout"
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts"

resources.view[] = 
resources.view.encoding = "UTF-8"
resources.view.basePath = APPLICATION_PATH "/views/scripts"

resources.session.save_path = APPLICATION_PATH "/../data/session"
resources.session.use_only_cookies = true
resources.session.remember_me_seconds = 864000
resources.session.saveHandler.class = "Zend_Session_SaveHandler_DbTable"
resources.session.saveHandler.options.name = "session"
resources.session.saveHandler.options.primary.session_id = "session_id"
resources.session.saveHandler.options.primary.save_path = "save_path"
resources.session.saveHandler.options.primary.name = "name"
resources.session.saveHandler.options.primaryAssignment.sessionId = "sessionId"
resources.session.saveHandler.options.primaryAssignment.sessionSavePath = "sessionSavePath"
resources.session.saveHandler.options.primaryAssignment.sessionName = "sessionName"
resources.session.saveHandler.options.modifiedColumn = "modified"
resources.session.saveHandler.options.dataColumn = "session_data"
resources.session.saveHandler.options.lifetimeColumn = "lifetime"

[development : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1

resources.db.params.username = "root"
resources.db.params.password = ""

我当然删除了root密码,但是,这是我为这篇文章修改的全部内容.



1> Rob Allen..:

您需要确保首先加载数据库资源.最简单的方法是向application/Bootstrap.php添加一个新函数:

bootstrap('db');
        $this->bootstrap('session');
    }

}

当然,你希望这会自动发生,所以我怀疑Zend_Applicaton的会话资源中存在依赖性错误......

推荐阅读
低调pasta_730
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有