How we setup cakephp without database?

cakephp-2.1

Solution

With CakePHP 2.3.x I simply use an empty string as a datasource in the database configuration and it works fine.

The database configuration (app/Config/database.php) is almost empty, it looks like this:

class DATABASE_CONFIG {
    public $default = array(
        'datasource' => '',
    );
}

You have to tell your AppModel not to use DB tables, otherwise you'll get an error: "Datasource class could not be found". It's not enough to set the $useTables in descendant models only.

class AppModel extends Model {
    public $useTable = false;
}

I dindn't experienced any problems with that yet.

Problem

In few project we don't need database, so how we setup cakephp on local machine without modification in database config? Right now what I done ...I created database and modified config file. But my database has no table, its just wastage of database....so please suggest better way to do this. Thank you in advance..

Original source