Hello folks,
I am a RoR developer, but I am presently working with CakePHP for a project where I cannot tweak the server. In my Rails production server, Passenger is setup to automatically use the "Production" environment, overriding the local app setup. I would like to setup my cakephp app to do the same thing. How do you usually accomplish that with CakePHP? Do you set up a domain parser, or you just keep core.php and database.php out of version control?
Thanks in advance,
Davide
views:
458answers:
3
A:
You could just create an extra file that holds the single Configure::write('debug', 0)
* directive, import that in the core.php file and keep it out of version control. Best of both worlds.
*or whatever else you need to change
deceze
2009-06-29 07:10:21
A:
For the database, you could set up the local and production connection settings and then create the file app/app_model.php and include the line:
class AppModel extends Model
{
var $useDbConfig = 'production';
}
Then you could create the file app/app_controller.php and parse the domains and tell it which dbconfig to use and any other core.php settings by using Configure::write.
jimiyash
2009-06-29 07:13:48
+1
A:
Hmm..if I understood the question correctly, this might be the thing you need:
dr Hannibal Lecter
2009-06-29 10:44:31
Perfect, exactly waht I was looking for
nutsmuggler
2009-06-30 20:23:31
GLad this article helped you :) please leave feedback
Eddie
2009-07-06 15:57:45