Cake PHP Fatal Error (256)

浪尽此生 提交于 2019-12-09 01:38:21

问题


I have just created an application using cake bake and when I run it I get the screen that says 'Sweet, myApp got baked' but there are no styling on it and at the bottom I get the following error:

Fatal Error (256): ConnectionManager::getDataSource - Non-existent data source default [CORE\cake\libs\model\connection_manager.php, line 102]

I've configure my database and user etc. But I don't understood what's going on.

Can anyone help please?


回答1:


You likely entered a name for Cake's bake wizard. Replace that name in app/config/database.php with "$default" Thus,

var $blog = array(...);

becomes

var $default = array(...);



回答2:


I've just fixed similar bug on my site. Check if all tables in the DB are there. My problem was missing table after db import . Good luck :)



来源:https://stackoverflow.com/questions/3245417/cake-php-fatal-error-256

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!