CakePHP Shell issue

Posted by aboxy on Stack Overflow See other posts from Stack Overflow or by aboxy
Published on 2010-05-12T01:23:52Z Indexed on 2010/05/12 1:34 UTC
Read the original article Hit count: 280

Filed under:

Hello,

I am just getting started with Cakephp shell and running into issues. My cake core library is under path d:/libs/cake My app is setup under d:/servers/htdocs/myapp

I wrote a test shell under d:/servers/htdocs/myapp/vendor/shells


class ReportShell extends Shell {
 var $uses = array('Appt');
 function main() {
  echo $this->Appt->find('first');


 }
}

When I try to run this code from d:/servers/htdocs/myapp , It gives me an error


Warning: include_once(d:/servers/htdocs/myapp/config/database.php): failed to open stream: No such file or directory in d:/libs/cake\libs\mode l\connection_manager.php on line 23

Warning: include_once(): Failed opening 'd:/servers/htdocs/myapp/config/database.php' for inclusion (include_path='.;D:\work\xampp\php\PEAR') in d:/libs/cake\libs\model\connection_manager.php on line 23

Fatal error: ConnectionManager::getDataSource - Non-existent data source default in d:/libs/cake\libs\model\connection_manager.php on line 102


Reason is that it is trying to find database.php under 'd:/servers/htdocs/myapp/config/' and the correct path is 'd:/servers/htdocs/myapp/app/config/database.php'

What am I doing wrong here?

thanks

© Stack Overflow or respective owner

Related posts about cakephp