我用 CakePHP 1.2.5 版开发了一个网站,到那时一切都很好。但现在,我正在尝试使用 CakePHP 2.2.1 版重新实现我的网站。
但是与数据库(火鸟)的连接不再起作用。
这是我的 cake/app/Config/database.php 文件:
class DATABASE_CONFIG {
var $default = array(
'driver' => 'firebird',
'persistent' => false,
'host' => 'localhost',
'login' => 'SYSDBA',
'password' => 'masterkey',
'database' => 'd:\\IBDatabase\\DATA.GDB',
'port' => '3050',
'connect' => 'ibase_connect'
);
var $test = array(
'driver' => 'firebird',
'persistent' => false,
'host' => 'localhost',
'login' => 'SYSDBA',
'password' => 'masterkey',
'database' => 'd:\\IBDatabase\\DATA.GDB',
'prefix' => '',
);
}
这是我得到的错误:
Missing Datasource
Error: Datasource class could not be found.
Notice: If you want to customize this error message, create app\View\Errors\missing_datasource.ctp
Stack Trace
CORE\Cake\Model\ConnectionManager.php line 97 → ConnectionManager::loadDataSource(string)
CORE\Cake\Model\Model.php line 3158 → ConnectionManager::getDataSource(string)
CORE\Cake\Model\Model.php line 1092 → Model->setDataSource(string)
CORE\Cake\Model\Model.php line 3180 → Model->setSource(string)
CORE\Cake\Model\Model.php line 1301 → Model->getDataSource()
CORE\Cake\Model\Model.php line 1389 → Model->schema()
CORE\Cake\Controller\Component\PaginatorComponent.php line 354 → Model->hasField(string)
CORE\Cake\Controller\Component\PaginatorComponent.php line 125 → PaginatorComponent->validateSort(Professionals, array, array)
CORE\Cake\Controller\Controller.php line 1082 → PaginatorComponent->paginate(null, array, array)
APP\Controller\ProfessionalsController.php line 12 → Controller->paginate()
[internal function] → ProfessionalsController->index()
CORE\Cake\Controller\Controller.php line 485 → ReflectionMethod->invokeArgs(ProfessionalsController, array)
CORE\Cake\Routing\Dispatcher.php line 186 → Controller->invokeAction(CakeRequest)
CORE\Cake\Routing\Dispatcher.php line 161 → Dispatcher->_invoke(ProfessionalsController, CakeRequest, CakeResponse)
APP\webroot\index.php line 92 → Dispatcher->dispatch(CakeRequest, CakeResponse)
有谁知道我应该怎么做?谢谢!!