francky06l,
Your approach work great! It gets rid of the pesky notices, and it
will make it easier to do master reports about all systems.
BTW, so I didn't have to change each model, I put the line
> var $useDbConfig = CLIENTDB;
in app_model.php and that seems to work.
Thanks,
Russell
On Mar 14, 11:00 am, "francky06l" <[EMAIL PROTECTED]> wrote:
> 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
-~----------~----~----~----~------~----~------~--~---