2005-07-04 01:07:14 +00:00
|
|
|
<?php
|
2005-10-09 01:56:21 +00:00
|
|
|
/**
|
2006-01-20 07:46:14 +00:00
|
|
|
* This is core configuration file.
|
|
|
|
*
|
2011-05-23 03:19:13 +00:00
|
|
|
* Use it to configure core behaviour of Cake.
|
2005-10-09 01:56:21 +00:00
|
|
|
*
|
2010-10-03 16:38:58 +00:00
|
|
|
* PHP 5
|
2005-10-09 01:56:21 +00:00
|
|
|
*
|
2009-05-01 21:05:46 +00:00
|
|
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
2012-03-13 02:46:07 +00:00
|
|
|
* Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
2005-10-09 01:56:21 +00:00
|
|
|
*
|
2005-12-23 21:57:26 +00:00
|
|
|
* Licensed under The MIT License
|
|
|
|
* Redistributions of files must retain the above copyright notice.
|
2005-10-09 01:56:21 +00:00
|
|
|
*
|
2012-03-13 02:46:07 +00:00
|
|
|
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
2010-01-26 19:18:20 +00:00
|
|
|
* @link http://cakephp.org CakePHP(tm) Project
|
2011-10-14 19:06:36 +00:00
|
|
|
* @package app.Config
|
2008-10-30 17:30:26 +00:00
|
|
|
* @since CakePHP(tm) v 0.2.9
|
2009-05-01 21:05:46 +00:00
|
|
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
2005-10-09 01:56:21 +00:00
|
|
|
*/
|
2005-06-05 19:42:54 +00:00
|
|
|
/**
|
|
|
|
* In this file you set up your database connection details.
|
2006-01-20 07:46:14 +00:00
|
|
|
*
|
2010-12-24 18:57:20 +00:00
|
|
|
* @package cake.config
|
2005-06-05 19:42:54 +00:00
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* Database configuration class.
|
|
|
|
* You can specify multiple configurations for production, development and testing.
|
2005-10-24 09:54:24 +00:00
|
|
|
*
|
2011-11-04 22:07:31 +00:00
|
|
|
* datasource => The name of a supported datasource; valid options are as follows:
|
2011-05-16 18:58:18 +00:00
|
|
|
* Database/Mysql - MySQL 4 & 5,
|
|
|
|
* Database/Sqlite - SQLite (PHP5 only),
|
|
|
|
* Database/Postgres - PostgreSQL 7 and higher,
|
2011-09-03 11:20:19 +00:00
|
|
|
* Database/Sqlserver - Microsoft SQL Server 2005 and higher
|
2007-02-21 17:12:20 +00:00
|
|
|
*
|
2011-11-04 22:07:31 +00:00
|
|
|
* You can add custom database datasources (or override existing datasources) by adding the
|
|
|
|
* appropriate file to app/Model/Datasource/Database. Datasources should be named 'MyDatasource.php',
|
2011-03-16 04:14:37 +00:00
|
|
|
*
|
2007-02-21 17:12:20 +00:00
|
|
|
*
|
|
|
|
* persistent => true / false
|
2007-09-24 23:49:54 +00:00
|
|
|
* Determines whether or not the database should use a persistent connection
|
2005-10-24 09:54:24 +00:00
|
|
|
*
|
|
|
|
* host =>
|
2011-01-26 14:03:06 +00:00
|
|
|
* the host you connect to the database. To add a socket or port number, use 'port' => #
|
2005-10-24 09:54:24 +00:00
|
|
|
*
|
2007-02-21 17:12:20 +00:00
|
|
|
* prefix =>
|
|
|
|
* Uses the given prefix for all the tables in this database. This setting can be overridden
|
|
|
|
* on a per-table basis with the Model::$tablePrefix property.
|
|
|
|
*
|
2008-02-03 01:28:43 +00:00
|
|
|
* schema =>
|
2011-01-26 14:03:06 +00:00
|
|
|
* For Postgres specifies which schema you would like to use the tables in. Postgres defaults to 'public'.
|
2008-02-03 01:28:43 +00:00
|
|
|
*
|
|
|
|
* encoding =>
|
2011-01-26 14:03:06 +00:00
|
|
|
* For MySQL, Postgres specifies the character encoding to use when connecting to the
|
|
|
|
* database. Uses database default not specified.
|
2008-02-03 01:28:43 +00:00
|
|
|
*
|
2011-09-16 08:07:22 +00:00
|
|
|
* unix_socket =>
|
|
|
|
* For MySQL to connect via socket specify the `unix_socket` parameter instead of `host` and `port`
|
2005-06-05 19:42:54 +00:00
|
|
|
*/
|
2007-02-21 17:12:20 +00:00
|
|
|
class DATABASE_CONFIG {
|
2008-02-03 01:28:43 +00:00
|
|
|
|
2010-04-04 07:14:14 +00:00
|
|
|
public $default = array(
|
2011-03-16 04:14:37 +00:00
|
|
|
'datasource' => 'Database/Mysql',
|
2007-02-21 17:12:20 +00:00
|
|
|
'persistent' => false,
|
|
|
|
'host' => 'localhost',
|
|
|
|
'login' => 'user',
|
|
|
|
'password' => 'password',
|
2007-10-20 10:14:30 +00:00
|
|
|
'database' => 'database_name',
|
|
|
|
'prefix' => '',
|
2011-08-13 15:10:29 +00:00
|
|
|
//'encoding' => 'utf8',
|
2007-02-21 17:12:20 +00:00
|
|
|
);
|
2008-02-03 01:28:43 +00:00
|
|
|
|
2010-04-04 07:14:14 +00:00
|
|
|
public $test = array(
|
2011-03-16 04:14:37 +00:00
|
|
|
'datasource' => 'Database/Mysql',
|
2007-02-21 17:12:20 +00:00
|
|
|
'persistent' => false,
|
|
|
|
'host' => 'localhost',
|
|
|
|
'login' => 'user',
|
|
|
|
'password' => 'password',
|
2007-10-20 10:14:30 +00:00
|
|
|
'database' => 'test_database_name',
|
|
|
|
'prefix' => '',
|
2011-08-13 15:10:29 +00:00
|
|
|
//'encoding' => 'utf8',
|
2007-02-21 17:12:20 +00:00
|
|
|
);
|
2005-06-05 19:42:54 +00:00
|
|
|
}
|