Monday, December 5, 2011

Re: [ASK: Installer script cakephp] Preventing index (plugin) to checking database.php

On Thu, Dec 1, 2011 at 5:13 PM, thom <cyber.phantom79@gmail.com> wrote:
> #Error message I got
>
> Warning (2): include_once(/var/www/simpus22/app/config/database.php)
> [http://php.net/function.include-once]: failed to open stream: No such
> file or directory [CORE/cake/libs/model/connection_manager.php, line
> 23]
>
> Warning (2): include_once() [http://php.net/function.include]: Failed
> opening '/var/www/simpus22/app/config/database.php' for inclusion
> (include_path='/var/www/simpus22:/var/www/simpus22/app/:.:/usr/share/php:/usr/share/pear')
> [CORE/cake/libs/model/connection_manager.php, line 23]
>
> Fatal Error (256): ConnectionManager::getDataSource - Non-existent
> data source default [CORE/cake/libs/model/connection_manager.php, line
> 102]
>

I've figured out the problem. It's my AppController::afterFilter()
that causing it. Since, it tries to access database.. :)

These are what I inserted :

if (class_exists('DATABASE_CONFIG')){
##your code here
}

--
Regards,,,
thom
http://mynameisthom.blogspot.com

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: