0

我在 slackware 13.37 中尝试使用 Yii 1.1.14 制作的应用程序

尝试连接时,它会显示带有此消息的页面:

错误 500
CDbConnection 无法打开数据库连接。

受保护/运行时中的 application.log 显示了这一点

2017/09/07 10:32:16 [error] [exception.CDbException] could not find driver
2017/09/07 10:32:16 [error] [exception.CDbException] exception 'CDbException' with message 'CDbConnection failed to open the DB connection.' in /var/www/htdocs/myapp/yii/framework/db/CDbConnection.php:388
Stack trace:
#0 /var/www/htdocs/myapp/yii/framework/db/CDbConnection.php(330): CDbConnection->open()
#1 /var/www/htdocs/myapp/yii/framework/db/CDbConnection.php(308): CDbConnection->setActive(true)
#2 /var/www/htdocs/myapp/yii/framework/base/CModule.php(387): CDbConnection->init()
#3 /var/www/htdocs/myapp/yii/framework/base/CApplication.php(450): CModule->getComponent('db')
#4 /var/www/htdocs/myapp/yii/framework/db/ar/CActiveRecord.php(634): CApplication->getDb()
#5 /var/www/htdocs/myapp/yii/framework/db/ar/CActiveRecord.php(667): CActiveRecord->getDbConnection()
#6 /var/www/htdocs/myapp/yii/framework/db/ar/CActiveRecord.php(1455): CActiveRecord->getCommandBuilder()
#7 /var/www/htdocs/myapp/protected/components/UserIdentity.php(8): CActiveRecord->find('LOWER(username)...', Array)
#8 /var/www/htdocs/myapp/protected/models/LoginForm.php(52): UserIdentity->authenticate()
#9 /var/www/htdocs/myapp/yii/framework/validators/CInlineValidator.php(42): LoginForm->authenticate('password', Array)
#10 /var/www/htdocs/myapp/yii/framework/validators/CValidator.php(213): CInlineValidator->validateAttribute(Object(LoginForm), 'password')
#11 /var/www/htdocs/myapp/yii/framework/base/CModel.php(159): CValidator->validate(Object(LoginForm), NULL)
#12 /var/www/htdocs/myapp/protected/controllers/SiteController.php(97): CModel->validate()
#13 /var/www/htdocs/myapp/yii/framework/web/actions/CInlineAction.php(49): SiteController->actionLogin()
#14 /var/www/htdocs/myapp/yii/framework/web/CController.php(308): CInlineAction->runWithParams(Array)
#15 /var/www/htdocs/myapp/yii/framework/web/CController.php(286): CController->runAction(Object(CInlineAction))
#16 /var/www/htdocs/myapp/yii/framework/web/CController.php(265): CController->runActionWithFilters(Object(CInlineAction), Array)
#17 /var/www/htdocs/myapp/yii/framework/web/CWebApplication.php(282): CController->run('login')
#18 /var/www/htdocs/myapp/yii/framework/web/CWebApplication.php(141): CWebApplication->runController('site/login')
#19 /var/www/htdocs/myapp/yii/framework/base/CApplication.php(180): CWebApplication->processRequest()
#20 /var/www/htdocs/myapp/index.php(14): CApplication->run()
#21 {main}

REQUEST_URI=/myapp/index.php?r=site/login
HTTP_REFERER=http://192.168.0.131/myapp/index.php?r=site/login

应用程序的源代码及其与数据库的连接在 debian 和 ubuntu 中运行良好。

其他用php制作的应用程序可以连接到slackware服务器中的同一个数据库。

有什么帮助吗?

4

0 回答 0