Category Archives: configuration

Using bake with (PHP)Eclipse

Lately, Matt posted in a thread with the title “cool editors for using with cakephp” a tip for using bake from within PHPEclipse: Choose “Run”, “External Tools”, “External Tools…” Select “Program” and create a new configuration with “New” There are two ways to configure such a configuration: Location: /usr/bin/php Working Directory: <where_cake_is>/cake/scripts Arguments: bake.php Or […]

Trunk has been restructured

If you use the trunk version of CakePHP you probably have seen that the structure has changed. There are now two branches available: 1.x.x.x contains the current stable version 2.x.x.x contains the code for the next version This change means you have to adapt your local configuration. In my case I have to modify the […]

Store your sessions in a different database

Since RC5 it is possible to store the sessions in the database. You can enable that with setting the constant CAKE_SESSION_SAVE in app/config/core.php to “database” (make sure you have created the necessary table with app/config/sql/sessions.sql). By default, you create this session table in the same database which contains your data. But what to do if […]

Switch your database configuration based on some criteria

Currently, I am experimenting with unit tests. These tests should use an own database. And so I defined a “test” configuration in app/config/database.php: var $test = array(‘driver’ => ‘mysql’, ‘connect’ => ‘mysql_pconnect’, ‘host’ => ‘localhost’, ‘login’ => ‘user’, ‘password’ => ‘password’, ‘database’ => ‘project_name-test’, ‘prefix’ => ”); But it does not automatically use the “test” […]