useDbconfig not working on ubuntu

2011-06-23 Thread tiger276
Hi, I am using 1.3.8 cakephp for my company website. The production server is 10.0.4 ubuntu server. I am using two databases db1 and db2. I have db1 and db2 details in database.php file. I have db1 details defined as var $default and db2 details defined as var $db2. I have persistent set to false i

Re: $useDbConfig not working

2010-03-29 Thread John Andersen
Please show the code where you are setting the $useDbConfig, and what is the name of the file in which you are doing it! Enjoy, John On Mar 30, 8:31 am, mattmemo wrote: > Hello, > I would like to have two different database configurations.  For my > Projects controller, I would like to use $de

$useDbConfig not working

2010-03-29 Thread mattmemo
Hello, I would like to have two different database configurations. For my Projects controller, I would like to use $default, and for my Employees controller, I would like to use $server4. In my model Employee.php, I set var $useDbConfig = 'server4'; no matter what I do, I can't get these two to w

Re: var $useDbConfig not working - caching?

2009-07-14 Thread Alastair
Hi Komaruloh, I wonder if your mail client is having problems because you posted this twice earlier. As I said in my reply, this isn't the issue but it's been resolved now so many thanks for your suggestion. Alastair On Jul 14, 4:25 am, komaruloh wrote: > I'm not sure if it's all about cache.

Re: var $useDbConfig not working - caching?

2009-07-14 Thread komaruloh
I'm not sure if it's all about cache. But perhaps you could add this option to your database.php var $default = array( . . . 'persistent' => false, . . . ); var $prod = array( . . .

Re: var $useDbConfig not working - caching?

2009-07-14 Thread Jon Bennett
> How to switch DB connections based on environment automatically. > http://edwardawebb.com/programming/php-programming/cakephp/automatically-choose-database-connections-cakephp nice :) You can't do that in core.php or bootstrap.php or webroot/index.php though, as they aren't classes, so I think

Re: var $useDbConfig not working - caching?

2009-07-14 Thread Alastair
On Jul 14, 1:24 pm, Smelly Eddie wrote: > How to switch DB connections based on environment > automatically.http://edwardawebb.com/programming/php-programming/cakephp/automatica... > Thanks for this link, a slightly more robust solution! --~--~-~--~~~---~--~~ Y

Re: var $useDbConfig not working - caching?

2009-07-14 Thread Smelly Eddie
How to switch DB connections based on environment automatically. http://edwardawebb.com/programming/php-programming/cakephp/automatically-choose-database-connections-cakephp On Jul 14, 6:55 am, Alastair wrote: > Ahh lovely! That works perfect. Still not sure what was causing the > problem I've

Re: var $useDbConfig not working - caching?

2009-07-14 Thread Alastair
Ahh lovely! That works perfect. Still not sure what was causing the problem I've been discussing but it doesn't matter for the time being. Get that blogged! Or I'll do it :) On Jul 14, 11:31 am, Jon Bennett wrote: > hi Alastair, > > > > > > > Here's the content of my database.php file. Nothing

Re: var $useDbConfig not working - caching?

2009-07-14 Thread Jon Bennett
hi Alastair, > Here's the content of my database.php file. Nothing out of the > ordinary here? > > class DATABASE_CONFIG { > >        var $default = array( >                'driver' => 'mysql', >                'persistent' => false, >                'host' => 'localhost', >                'login

Re: var $useDbConfig not working - caching?

2009-07-14 Thread Alastair
Hi Komaruloh, Thanks for your help. I actually have persistent set to false. Here's the content of my database.php file. Nothing out of the ordinary here? class DATABASE_CONFIG { var $default = array( 'driver' => 'mysql', 'persistent' => false,

Re: var $useDbConfig not working - caching?

2009-07-13 Thread komaruloh
I'm not sure if it's all about cache. But perhaps you could add this option to your database.php var $default = array( . . . 'persistent' => false, . . . ); var $prod = array( . . .

Re: var $useDbConfig not working - caching?

2009-07-13 Thread komaruloh
I'm not sure if it's all about cache. But perhaps you could add this option to your database.php var $default = array( . . . 'persistent' => false, . . . ); var $prod = array( . . .

Re: var $useDbConfig not working - caching?

2009-07-13 Thread Alastair
Ok, while I haven't solved the problem, I've managed to get a little more information from this. It is definitely using the $default database configuration. If I don't have the $default set up, it fails with an error message. "Fatal Error (256): ConnectionManager::getDataSource - Non-existent da

Re: var $useDbConfig not working - caching?

2009-07-13 Thread Alastair
On Jul 7, 3:37 pm, Robert P wrote: > The first step in trying to debug a possible caching issue is to > navigate through all the folders under /app/tmp/cache and delete every > file. Any future uploads should not include the /app/tmp directory. If > the issue persists it's not a problem with cac

Re: var $useDbConfig not working - caching?

2009-07-07 Thread Robert P
The first step in trying to debug a possible caching issue is to navigate through all the folders under /app/tmp/cache and delete every file. Any future uploads should not include the /app/tmp directory. If the issue persists it's not a problem with caching. On Jul 7, 10:28 pm, Alastair wrote: >

Re: var $useDbConfig not working - caching?

2009-07-07 Thread Alastair
Incidentally, commenting/uncommenting var $useDbConfig = 'prod'; in my app_model does apply the database settings on my local machine. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this g

var $useDbConfig not working - caching?

2009-07-07 Thread Alastair
Hi Cake fans, I'm currently developing locally and uploading intermittently to my remote server. I have $default and $prod database configurations set up in my database.php file, however on setting var $useDbConfig = 'prod'; in app_model.php and uploading this to my remote server, it's still usin