you can use the same database.php. In this one you could define
different database ie : 'client1', 'client2' etc config ..In your
index.php you could define a value set to the spotted DB (ie :
define('CLIENTDB', 'client1'); and at the end in your models you could
set :

var $useDbConfig  =  CLIENTDB;

that will point your models to the desired DB.

Hope this helps

On Mar 14, 6:12 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I was hired to develop an application that is now going to be sold as
> a service.  So customers pay a fee and we install an instance of the
> application with their branding on our server.
>
> I am figuring out how to install and manage the instances.
>
> I plan is to share the cake and app folder among all the
> installations, but create a unique webroot and config folder for each
> client.  The config folder is necessary so I can use a client-specific
> database.php and define client-specific constants in the
> bootstrap.php.
>
> I was able to get a test working on my development box, but I had to
> force my will upon cake a bit, and I want to know what you fellow
> developers thought of my approach.  Is there a better way?
>
> WHAT I DID:
>
> For this example, I am creating an instance for a client called foo
>
> 1. Create folder "foo"
> 2. Copied webroot of original app to foo folder
> 3. Copied config of original app to foo folder
> 4. In foo/webroot/index.php:
>  - i. changed ROOT to point to original app directory
>  - ii. added the line: define('CONFIGS',
> dirname(dirname(__FILE__)).DS.'config'.DS);
>  - iii. added the line: define('APP_PATH',
> dirname(dirname(__FILE__)).DS);


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to