Newbie question about multiple databases

2008-06-30 Thread rfflower
I'm a newbie trying to understand CAKE, and so far so good. I've understood the 'blog' tutorial. I am trying to make an app where users login and then use the app to add their data to their own copy of a database. There would be lots of databases (all same structure) each solely for that user. I t

Re: newbie question about multiple databases

2007-04-11 Thread Sergei Gerasenko
Well, it turns out that it's a bug that first appeared in 1.1.14. It seems that it was first reported on the 8th. The ticket number is 2370. On Wed, Apr 11, 2007 at 09:25:39AM -0400, Sergei Gerasenko wrote: > > I had an email hiccup yesterday, so I'm not sure if you got my last > message. Just i

Re: newbie question about multiple databases

2007-04-11 Thread Sergei Gerasenko
I had an email hiccup yesterday, so I'm not sure if you got my last message. Just in case I'll update you on what I've found. The bottom line is that it works in 1.1.11.4064 and doesn't in 1.1.14.4797. I don't know if a bug was introduced in 1.1.14, but I guess it's possible. Is there a way to

Re: newbie question about multiple databases

2007-04-10 Thread BlenderStyle
Two different servers can act differently. I have a SUSE LAMP server at work and an Ubuntu LAMP server at home, and they experience different issues. I think I must have compiled Apache and PHP differently. On Apr 10, 9:05 am, Sergei Gerasenko <[EMAIL PROTECTED]> wrote: > OK, I duplicated the set

Re: newbie question about multiple databases

2007-04-10 Thread Sergei Gerasenko
OK, I duplicated the setup at work and everything went great. So there must be something with my setup at home. I'll try not to bug you guys about this anymore until I find out what's causing it. --~--~-~--~~~---~--~~ You received this message because you are subsc

Re: newbie question about multiple databases

2007-04-10 Thread Sergei Gerasenko
No, unfortunately that didn't help. On Tue, Apr 10, 2007 at 11:29:44AM -0400, Sergei Gerasenko wrote: > > I think my directory structure is not quite right. Don't know how it > happened but I'm sure that's the reason. I'll check it tonight and let > you know. > > --~--~-~--~~-

Re: newbie question about multiple databases

2007-04-10 Thread Sergei Gerasenko
I think my directory structure is not quite right. Don't know how it happened but I'm sure that's the reason. I'll check it tonight and let you know. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group.

Re: newbie question about multiple databases

2007-04-10 Thread Sergei Gerasenko
Nope, neither distribution worked. On Tue, Apr 10, 2007 at 04:26:55AM -, BlenderStyle wrote: > > Did migrating to 1.2.0.4798alpha fix your problem? I've found, that > even though it's an alpha, 1.2 works pretty well. > > On Apr 9, 6:06 pm, Sergei Gerasenko <[EMAIL PROTECTED]> > wrote: > > I

Re: newbie question about multiple databases

2007-04-09 Thread BlenderStyle
Did migrating to 1.2.0.4798alpha fix your problem? I've found, that even though it's an alpha, 1.2 works pretty well. On Apr 9, 6:06 pm, Sergei Gerasenko <[EMAIL PROTECTED]> wrote: > I was using 1.1.14 but then when I got the error I tried the > 1.2.0.4798-alpha. That is, I replaced the 1.1.14 ca

Re: newbie question about multiple databases

2007-04-09 Thread Sergei Gerasenko
I was using 1.1.14 but then when I got the error I tried the 1.2.0.4798-alpha. That is, I replaced the 1.1.14 cake directory with the cake directory from the alpha distribution. On Tue, Apr 10, 2007 at 12:46:22AM -, BlenderStyle wrote: > > What version of Cake are you using? > > On Apr 9, 5

Re: newbie question about multiple databases

2007-04-09 Thread BlenderStyle
What version of Cake are you using? On Apr 9, 5:40 pm, Sergei Gerasenko <[EMAIL PROTECTED]> wrote: > Thanks for the quick response. Unfortunately, that didn't do it. > > Here's the modified app/config/database.php > > class DATABASE_CONFIG > { > var $default = array('driver' => 'mysql', >

Re: newbie question about multiple databases

2007-04-09 Thread Sergei Gerasenko
Thanks for the quick response. Unfortunately, that didn't do it. Here's the modified app/config/database.php class DATABASE_CONFIG { var $default = array('driver' => 'mysql', 'connect' => 'mysql_connect', 'host' => 'localhost', 'login' => '***',

Re: newbie question about multiple databases

2007-04-09 Thread BlenderStyle
I ran into this too. One of the database configs has to be default. So change $psw to $default, and remove var $useConfig in your customer model (it uses default by, well, default). If persistent is set to true, you can't use two configs simultaneously. I'm guessing if persistent is true, and th

Re: newbie question about multiple databases

2007-04-09 Thread Sergei Gerasenko
> You're welcome. In doing this, I learned about the persistent key, so > everyone wins. Let us know how it goes. Just tried this at home and I'm baffled with this error: Cannot redeclare class dbosource in /var/www/cake/cake/libs/model/datasources/dbo_source.php Here's my setup: app/config/da

Re: newbie question about multiple databases

2007-04-09 Thread Sergei Gerasenko
I must admit that I should have asked you about what you found about the persistent key thingy. Should it be set to "false" in this situation? And if so, why do you think it's the case? Sorry if it sounds like an interview question :) On Mon, Apr 09, 2007 at 08:49:17PM -, BlenderStyle wrote:

Re: newbie question about multiple databases

2007-04-09 Thread BlenderStyle
You're welcome. In doing this, I learned about the persistent key, so everyone wins. Let us know how it goes. On Apr 9, 1:15 pm, Sergei Gerasenko <[EMAIL PROTECTED]> wrote: > Matt, thanks so much for all the time you took to test this thing. I > can see how it could work now. I'm off and running

Re: newbie question about multiple databases

2007-04-09 Thread Sergei Gerasenko
Matt, thanks so much for all the time you took to test this thing. I can see how it could work now. I'm off and running now. Thanks!!! On Mon, Apr 09, 2007 at 07:59:26PM -, BlenderStyle wrote: > > Okay, I just tried it, and it worked. Here's what I did: > > Downloaded cake_1.2.0.4798alpha

Re: newbie question about multiple databases

2007-04-09 Thread BlenderStyle
Okay, I just tried it, and it worked. Here's what I did: Downloaded cake_1.2.0.4798alpha, extracted it, and made app/tmp writeable. I created the following databases/users/tables: database: multidbtest_a user: multidbtest_a table: users (id, name) database: multidbtest_b user:multidbtest_b tabl

Re: newbie question about multiple databases

2007-04-09 Thread Sergei Gerasenko
> Yes, that should work. I haven't tried it, and I don't know how Cake > queries in a situation like this, but it doesn't hurt to try. Try it > out with scaffolding, and see if it works. Let us know. I think it would definitely stop working if database "B" has another username/password combinatio

Re: newbie question about multiple databases

2007-04-09 Thread BlenderStyle
Yes, that should work. I haven't tried it, and I don't know how Cake queries in a situation like this, but it doesn't hurt to try. Try it out with scaffolding, and see if it works. Let us know. On Apr 8, 1:49 pm, Sergei Gerasenko <[EMAIL PROTECTED]> wrote: > On Sun, Apr 08, 2007 at 06:58:33PM -00

Re: newbie question about multiple databases

2007-04-08 Thread Sergei Gerasenko
On Sun, Apr 08, 2007 at 06:58:33PM -, BlenderStyle wrote: > > A brief overview. > > You need to create separate entries in your database config file, one > for each database. In your model, specify which database to use. Then, > in your controller, specify which models to use. You can use mu

Re: newbie question about multiple databases

2007-04-08 Thread BlenderStyle
A brief overview. You need to create separate entries in your database config file, one for each database. In your model, specify which database to use. Then, in your controller, specify which models to use. You can use multiple models in your controller. If you need to know the specifics of each

newbie question about multiple databases

2007-04-08 Thread [EMAIL PROTECTED]
Hmm, I posted this a couple of hours ago but couldn't find it in the post list. So, I'm posting it again. Sorry if this is the second time you guys are getting it. === Hi everybody, I'm considering converting my application into CakePHP. Currently